This application removes comments from C/C++ source code.

Motivation: as I'm working from time to time with medium-to-large size third party code (pjsip, baresip) it was written to help with comparing source code of different version of projects. Most annoying thing are CVS tags in pjsip source code as once code is checked in and then checked out from own repository they are expanded/rewritten creating differences in every single file. Copyright notices are also annoying in similar way as they often may be single one detail changing between software version from different years.

What does this application do?

Files are processed in place (overwritten) - make sure to not work on main copy of the project. I've tested this tool on projects based on both pjsip (300+ kLOC) and baresip but handling of some rarely used language constructions is omitted (continuation inside single-line comments), results might be also unexpected when source code is not valid (has syntax errors).

C/C++ comment remover

 "Cookie monsters": 3491678    Parse time: 0.002 s