Mailing List Archive

Parsing C++ headers with Python
As part of an effort to make our documentation more automatic (at least
to the
degree that we can generate reports on header changes), I'd like to be
able to
parse out c++ headers from Python. I'm not looking for "complete"
parsing abilitiies--
the parser can assume that the headers are syntactically correct, can
ignore most
macro preprocessors, etc. etc. Does anyone know of a package to do this?
Does
anyone have a good set of regular expressions to do this? Please email
responses
to ken@be.com, as unfortunately I don't get much of a chance to read
newsgroups--
the connection to a newsgroup server from home is currently slow, and
there
is no newsgroup server at work.

Thanks in advance!
Ken McDonald
Tech Writer, Be, Inc.
ken@be.com
Parsing C++ headers with Python [ In reply to ]
>As part of an effort to make our documentation more automatic (at least to the
>degree that we can generate reports on header changes), I'd like to be able to
>parse out c++ headers from Python. I'm not looking for "complete"
>parsing abilitiies--

there is a tool written in perl for this purpose. see

http://friga.mer.utexas.edu/mark/perl/perceps/

for more information. the reason i am posting this, is because i would
be interested to port this tool to python, mainly because i am
familiar with python and have no clue about perl.

i would take the time to port it, and make the port available to the
python community, if someone could help me in understanding what perl
is doing (mainly regarding structure and regular expressions).

kaweh kazemi (e9025657@stud3.tuwien.ac.at)