[antlr-interest] String template use in Java w/tree grammar

Terence Parr parrt at cs.usfca.edu
Fri Jun 5 10:42:10 PDT 2009


On Jun 5, 2009, at 10:32 AM, Bill Andersen wrote:

> Folks..
>
> I have a tree grammar set up with template output.  Now I'm ready to
> integrate it with the parser that produces the AST and generate text.
>
> Question is, what do I need to do in Java to make the generated tree
> parser code aware of my defined template groups?   Is it just a call
> to setTemplateLib(StringTemplateGroup templateLib)?

yep.

You must tell the parser where to look for templates whether you're  
using a parser grammar or a tree grammar.
Ter


More information about the antlr-interest mailing list