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!
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!
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.