473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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

May 23 '06 #1
4 2469

<ss******@gmail.com> wrote in message
news:11**********************@38g2000cwa.googlegro 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"?
May 23 '06 #2
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.

May 23 '06 #3
<ss******@gmail.com> wrote in message
news:11**********************@38g2000cwa.googlegro 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

May 23 '06 #4
<ss******@gmail.com> wrote in message
news:11**********************@38g2000cwa.googlegro 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.]
May 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Markku Uttula | last post by:
I think I'm doing something wrong. I'm able to connect to Oracle just fine, execute queries and all, but I'm having serious problems with the speed :( For example, the following PHP-script on my...
6
by: Daniel Loose | last post by:
Hello, I have this strange including problem: I want to read a piece of HTML, residing in some file, into a variable, not echo it out. So far so easy - but now the HTML contains a line of...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
2
by: Mark Loveless | last post by:
Back in my mainframe days a crash dump could be parsed by hand to reveal the application program running at crash time as well as the offset into said program, which combined with a extended...
3
by: Eric Ellsworth | last post by:
Hi all, Does anyone have any bright ideas for Access' tendency to add square brackets when it parses queries, then tell you that the query syntax is invalid. In my case, I'm trying to do a LEFT...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
2
by: Dutchy | last post by:
Hi there, After spending several hours trying all I could imagine and search for in Google I gave up. In a continuous form I want to sort the choosen column by clicking the header (label) of...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
4
by: douglaswade | last post by:
I am new to Access, but I find this answer a little difficult to understand. I have an access query that list late work, I want to run the query and let say the results is ten records. I want one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.