[antlr-interest] Tree grammar/stringtemplate: do I need this?
Richard Clark
rdclark at gmail.com
Sun Jan 20 09:54:37 PST 2008
If the structure of your tree maps directly onto the HTML you want to
generate, why not write a simple tree walker? (Look at the source for
BaseTree.toStringTree).
If you want to do more than that (e.g. add pretty printing, print some
things in a differentr order, etc.), StringTemplate and a tree grammar are
the way to go. While it sounds like a pain to keep a parser and tree parser
synchronized, it's usually not that bad in practice.
...Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080120/a30f967f/attachment.html
More information about the antlr-interest
mailing list