Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How do I access an AST of parsed C++ code?

Reply
Thread Tools

How do I access an AST of parsed C++ code?

 
 
ssaammee@gmail.com
Guest
Posts: n/a
 
      05-23-2006
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 (such as an AST)? If
not, can a parser dump command be recommended?

Any help would be appreciated!

Thank you,
-Sam Edwards
Sedwards At Harmonia Dot Com

 
Reply With Quote
 
 
 
 
Jim Langston
Guest
Posts: n/a
 
      05-23-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>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 (such as an AST)? If
> not, can a parser dump command be recommended?
>
> Any help would be appreciated!


I'm not sure I understand your problem. Do you have the actual ADA and C++
source files as text files? And you are trying to convert them to XML?
What do you mean by a "high level parsed version"?


 
Reply With Quote
 
 
 
 
ssaammee@gmail.com
Guest
Posts: n/a
 
      05-23-2006
I have actual source files as text files. I want to put this into a
xml representation though, and in order to get things like mathematical
operations to execute in the correct order, I want to use an AST to try
and accomplish this.

 
Reply With Quote
 
Ira Baxter
Guest
Posts: n/a
 
      05-23-2006
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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 (such as an AST)? If
> not, can a parser dump command be recommended?


>Thank you,
>-Sam Edwards
>Sedwards At Harmonia Dot Com



The DMS Software Reengineering Toolkit has robust parsers for Ada83, Ada95
and a wide variety of C++ dialects including Visual Studion 2005.
It has an option to export its ASTs as XML.

See http://www.semanticdesigns.com/Produ...MSToolkit.html


--
Ira Baxter, CTO
www.semanticdesigns.com



 
Reply With Quote
 
Ira Baxter
Guest
Posts: n/a
 
      05-23-2006
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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 (such as an AST)? If
> not, can a parser dump command be recommended?
>
> Any help would be appreciated!
>
> Thank you,
> -Sam Edwards
> Sedwards At Harmonia Dot Com


The DMS Software Reengineering Toolkit provides generalized compiler
technology
for parsing, analysing and transforming source langauges. It can parse to
ASTs
and produce XML as an optoin. It has robust front ends for Ada83 and 95,
and a variety of dialects of C++, including ANSI, GNU, and MS Visual Studio
2005.
See http://www.semanticdesigns.com/Produ...MSToolkit.html


--
Ira Baxter, CTO
www.semanticdesigns.com

[Sorry if this is a duplicate. MS Outlook choked on the first reply,
so I don't know if it went out.]


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Invalid URI: The hostname could not be parsed SevDer ASP .Net 7 10-07-2005 05:22 AM
When/How often ist Web.config parsed Achim Domma (SyynX Solutions GmbH) ASP .Net 1 08-30-2005 01:39 PM
Allow users to embed custom tags in CMS system and have them parsed -- how? ASP .Net 1 03-18-2005 10:54 PM
Better way of getting parsed Python rather than an AST? Kenneth McDonald Python 1 10-10-2004 01:58 AM



Advertisments