--- "William Trenker
Does anyone know if there is a GCC option to save the C++ parse tree to a file? Or has anyone come across a C++ parser utility that does this? I'm building a Python extension for a library that has many .hpp files and I would like to try and automate the generation of the Boost.Python headers for this library.
Thanks, Bill
yes, i know of one called gcc-xml.. i don't know if the project is still being worked on, but basically it uses gcc's parser as a 1st phase and then takes the parse tree that's generated and outputs an xml file (i don't know if it has a schema or DTD available , it didn't when i last looked, but the xml format it uses is sufficiently simple that writing a DTD/schema should be trivially simple) url here : http://www.gccxml.org/HTML/Index.html last i checked it uses the gcc 3.0.4 source as the front end parser, so it may be a bit lacking in terms of advanced c++ features especially in the area of templates :) ( as was gcc in general until 'round 3.2 anyway ) but that should help you out :) --vat __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com