[antlr-interest] Anybody got a Java unparser?

Terence Parr parrt at jguru.com
Wed Feb 13 11:48:33 PST 2002

On Wednesday, February 13, 2002, at 11:43  AM, Todd Blanchard wrote:

> Which is to say, something that takes the parse tree from the java
> recognizer and writes back out the java source code?

I haven't built one, but I'm hoping to have time to use my new output 
grammar stuff to generate java back out.  Basically I have these string 
templates that are really documents that have attributes ("holes") that 
you can fill in with values via code.  You can also reference other 
documents thus providing a recursive grammatical spec sort of thing.  
The only thing I have not quite figured out is how to "correctly" get 
AST data pushed into the correct attributes of the output grammar.  If 
anybody wants to try futzing around, I will send them my string template 
prototype.  The StringTemplate class is what pushes out jGuru website.  
The DB fills in the attributes and then I just toString() the document 
and voila: you have an output page :)

Chief Scientist & Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list