Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Using CDT's Abstract Syntax Tree to write code?
Using CDT's Abstract Syntax Tree to write code? [message #997115] Thu, 03 January 2013 18:49 Go to next message
Erika Redmark is currently offline Erika RedmarkFriend
Messages: 22
Registered: January 2013
Junior Member
I've been able to properly use the abstract syntax tree APIs in CDT for parsing pre-existing C code in my program. However, I can't seem to find any examples on doing the reverse, (creating an AST programmatically and turning it into source code), so I am wondering if this is even possible. I would like to use an AST to generate code as it seems like it would make the process extremely easy.

If it is indeed possible, then what would be a starting point for using the API to generate an AST, and then source code from it? (Preferably no internal/deprecated methods)

- Erika
Re: Using CDT's Abstract Syntax Tree to write code? [message #998188 is a reply to message #997115] Wed, 09 January 2013 14:27 Go to previous message
Erika Redmark is currently offline Erika RedmarkFriend
Messages: 22
Registered: January 2013
Junior Member
Just in case anyone stumbles on this topic, I didn't get an answer here but got one on StackOverflow, Which I can't link to because I don't have enough messages (google "Using CDT's Abstract Syntax Tree API to generate/write C code?")

It's not a 'solve everything' answer but it seems a good starting point.
Previous Topic:Getting Started
Next Topic:Problems with Photran
Goto Forum:
  


Current Time: Thu Apr 25 18:49:08 GMT 2024

Powered by FUDForum. Page generated in 0.02891 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top