Is there a python library to parse C++ code file?

Fredrik Lundh fredrik at pythonware.com
Fri Mar 17 07:57:35 CET 2006


Allerdyce.John at gmail.com wrote:

> Is there a python library to parse C++ code file?
> If yes, can you please tell me where is it?

depends on how you want to parse the file, and what information you
want to extract.  without more details, I'd recommend

    http://www.gccxml.org/HTML/Index.html

combined with some python xml library, e.g.

    http://www.effbot.org/zone/element-index.htm
    http://www.effbot.org/zone/element-iterparse.htm

which gives you something like:

    http://www.boost.org/libs/python/pyste/

which might be a good thing to look at before you start ...

or maybe you had something much simpler in mind ?

</F>






More information about the Python-list mailing list