|XP is just a number|
Re: extract comments from source code.by Marshall (Abbot)
|on Sep 26, 2011 at 12:34 UTC||Need Help??|
To extract the lines between and including ones that start with <DTC> and end with </DTC>:
See: tutorial on Flip/Flop operator: Flipin good, or a total flop?
There are a number of Perl XML parsers that can deal with these lines after they have been extracted from the C code.
So that the C compiler will see the whole XML doc as a single comment block.
An alternate that is worth considering is Perl POD (Perl Plain Old Documentation) Perl POD. If you organize the "comments" in the C code right, the C compiler will be happy. And the Perl documentation generator will also be happy processing the raw C input file (a "=" as the first character on a line has special meaning). The Perl POD generators will make HTML web pages or man pages directly from the C source file, if the comments /*....*/ are done right.