En Tue, 09 Mar 2010 04:51:57 -0300, Faheem <faheem_...@yahoo.com> escribió:
I'm new in this community. I am writing a static analyzer for validating C Code using python and for that I'm looking for a python module/API that will detect Function block of a given C-File. I know simple function can be detected using push "{" and poping it if character "}" is found. This solution is actually done already, I want a robust API that can do more then that like detecting Function name parameters its return types etc.
Take a look at ctypeslib [1]; it uses gccxml [2] to parse .h header files and generate equivalent Python declarations.
[1] http://svn.python.org/view/ctypes/trunk/ctypeslib/ [2] http://www.gccxml.org/ -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list