Find function names from C
Jey Kottalam
kottalam at cs.ucdavis.edu
Tue Feb 3 00:39:16 EST 2004
"Berlin Brown" <bigbinc097_DONT_SPAM at comcast.net> wrote in message
news:zaCdnSd72anecoPdRVn-jg at comcast.com...
> I am parsing a C file and want to find the function names, is this
> python worthy or is Emacs-Lisp better for this. I have searched for
> some libraries but coming up null. I just need the function names, no
> args or anything else. I would probably have to run a regular
> expression pattern looking for int,void,static, etc and then the
> enclosing { }.
>
Look into www.gcc-xml.org or there's an ANSI-C parser at
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html that could easily be
adapted for your needs. (Yes, that's with C and yacc, not python. sorry.)
-Jey Kottalam
More information about the Python-list
mailing list