dcsimg
from java-file to ast and back to java-file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, February 25, 2002 02:51 AM

Hi, how can I convert my ast's back to a java-file wich I can use?

I'm working on a refactoringtool and have to parse java-files to get an AST, then I do some changes to this AST, and finally I should get a new java-file from this altered AST. How can I do this last step?

Re: from java-file to ast and back to java-file

Posted By:   Monty_Zukowski  
Posted On:   Tuesday, February 26, 2002 06:15 AM

Build a tree emitter. See the gcc code for an example, www.codetransform.com/gcc.html.


The basic strategy is to walk the tree writing out the tokens as needed. You will want to provide your own indentation stack so the formatting is nice.

About | Sitemap | Contact