C language processing.

stephen henry stehenry at yahoo.com
Sat Aug 21 05:22:32 EDT 2004


Hi all,

I'm looking for a python module that would allow me to take an input
file written in 'c' and modify the contents to allow me to, for
example, add arguments to functions, insert macros at specific
locations etc. I have no formal education in computer science , but,
what I believe I'm looking for is somesort of parser (or lexer?).

So far, I found a bunch of pasers (SimpleParse and SPARK) but these
seem to be quite generic -non-language specifc. I was hoping that the
'c' langauge was sufficiently well known to be supported natively,
meaning that I would't need to enter the grammar rules into the
parser.

Does anybody know of a way of doing this in python? (Or, for that
matter, with Perl, as I would be learning either language to carry
this out.)

Stephen Henry



More information about the Python-list mailing list