Marc A. Criley wrote:
ssaammee@gmail.com wrote:
I have legacy ADA and C++ code, and I need to export this code into an
XML format so I can create a tool to analyze and work with it. I tried
various tree-dump-* commands with g++ and didn't find anything that
looked to be read-able or anything that was at a high level like my
code (GIMPLE was much to low level for me because I want to maintain
variable names and such).
Is there a way I can access the parser for either C++ or ADA so that I
can access a high level parsed version of my code? If not, can a parser
dump command be recommended?
For C++ you can use GCC_XML from ,
and for Ada you have ASIS2XML,
For Ada the code will have to be compilable by a version of GNAT with
its corresponding ASIS implementation.
My understanding is that GCC_XML does not output function bodies
(see thier web page).
The DMS Software Reengineering Toolkit has robust parsers for
many dialects of C++, including ANSI, GNU, and MS Visual Studio 2005,
and parsers for Ada 83 and 95. DMS has an option to dump
the XML produced by the parsers, and so would satisfy the P's
request.
See
Ira D. Baxter, CT