how to convert AST into source code again????

Hi,

in source-to-source translation i want to convert C source into ast.
after making some changes to ast how can i produce C code from modified ast?

in source-to-source translation i want to convert C source into ast.

There are "print" functions for the various kinds of AST nodes. There are bugs that prevent them from always generating compilable source code, and of course they destroy the formatting of the original code, so I don't recommend trying to print an entire AST.

after making some changes to ast how can i produce C code from modified ast?

Check out the Objective-C rewriter I mentioned elsewhere. It uses limited AST printing along with the rewriter infrastructure to accomplish this.

  - Doug