[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-AnyPerl] Parsing C Code



I'm trying to write a script that injects a boilerplate C comment above
each function declaration in a C header file--kind of akin to the
javaDoc comments in a java source file. Eventually I may want to do the
same for constants, enums, typedefs, etc.

So, what I'm looking for is a parser that understands C declarations.  I
looked at C::Scan, and as far as I can make out, it does a good job of
giving me back lists of each type of API it finds in the header, but I
don't see how I can intervene and add comments as each API element is
discovered.  I need something that  is more event based, sending me
notice each time it hits a new API element as it scans the header.

Anyone heard of such a beast, or have a better idea how to solve this
problem?
Thanks!
Matt



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org