CppCommentRemover 0.1.1.0

Published by

CppCommentRemover is a portable app that allows comment removal from C/C++ source code.
CppCommentRemover is a portable app that allows comment removal from C/C++ source code.

The author was motivated in part to his working with medium-to-large size third party code (pjsip, baresip), it was written to help with comparing the source code of different version of projects. He notes that one annoying thing is CVS tags in pjsip source code, as once the code is checked in and then checked out from a repository they are expanded/rewritten creating differences in every single file. Copyright notices are also annoying similarly as they often may be a single detail changing between software versions from different years.

CppCommentRemover will help with processing files recursively from a selected folder, removing comments containing selected strings or all comments, as well as preserving file timestamps (by default) - original timestamps make comparing source easier. Files are processed in place (overwritten) - make sure to not work on the main copy of a given project.

CppCommentRemover has been tested on projects based on both pjsip (300+ kLOC) and baresip, but the handling of some rarely used language constructions are omitted (continuation inside single-line comments). This fact may cause unexpected when the source code is not valid (syntax errors). Preprocessor expressions are also not evaluated thus text from "#if 0" blocks are processed, and it has a higher chance to trigger unexpected behavior as it may contain unclosed block comment.

 Download