Find function names from C

Berlin Brown bigbinc097_DONT_SPAM at comcast.net
Tue Feb 3 23:08:06 EST 2004


Jey Kottalam wrote:
> "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
> 
> 

I have to go back to the books, dont know python or lisp very well, 
yacc,lex,  for one thing, that is exactly what lisp does in emacs 
anyway, the way it matches one { with another }




More information about the Python-list mailing list