[antlr-interest] still trying to make a crude Java to C++ translator in Antlr 3

Jean Marc Vanel JeanMarc.Vanel at mathworks.fr
Wed Feb 14 07:33:52 PST 2007


Hi

 

The title says it all.

 

After playing with the examples in Antlr 3, I hesitate between 2
technologies:

-          using TokenRewriteStream like in tweak example

-          using a tree parser like in treeparser and simplecTreeParser
examples

 

In the later case, I don't know how to recover in the final output the
original white spaces. What I did was calling getTree() on the root of
the grammar, and then a simple recursive printing with Tree.getChild() .

 

Thanks

 

Jean Marc Vanel

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070214/a43891df/attachment-0001.html 


More information about the antlr-interest mailing list