Reputation: 171
I had generated AST of java grammer using Antlr.
I had made some alterations in the AST, Now I need to write the AST as Java File at a particular location.
Could any one suggest me the available ways to do the same.
Thanks in Advance!
Upvotes: 0
Views: 1339
Reputation: 95306
There's more to this than "walk the tree and spit text". See this SO answer for how to do prettyprinting
ANTLR has so-called "string templates" which are likely to be of some help here.
Upvotes: 1