XML AST compile

Hi !

I’m working on a tool to make some AST transformation for C. After transformation I want to compile the modified AST. Clang can print the AST in XML but the question is, can we build the program from the XML file ?

I chose this method because the development of Clang is very fast and we need a sustainable solution. I have try to build some tools that date of December 2010. Nothing works with the last version of Clang. Also tutorial are out of date.

Another question is about the XML change of format of the file. Is it fixe or not ?

I’m new in this field and if someone have some recommendation or suggestion … I thank you !

Grégory

Hi !

I'm working on a tool to make some AST transformation for C. After transformation I want to compile the modified AST. Clang can print the AST in XML but the question is, can we build the program from the XML file ?

No.

I chose this method because the development of Clang is very fast and we need a sustainable solution. I have try to build some tools that date of December 2010. Nothing works with the last version of Clang.

There are really only two options here: merge from top-of-tree Clang constantly, or only pick up releases and go through a massive merge every 6 months or so.

Also tutorial are out of date.

Yes, they are, and it's unfortunate.

Another question is about the XML change of format of the file. Is it fixe or not ?

The XML format is incomplete, undocumented, and changes from time to time. I don't recommend using it for anything.

  - Doug