[antlr-interest] How to use inline templating with the StringTemplate interface

Imre András iar73 at freemail.hu
Sat Dec 6 13:40:14 PST 2008


Hi,

I'm checking out the templating output feature of Antlr. I started with CMinus.g grammar found in examples-v3.tar.gz. Based on this grammar I created another one, which call templates defined in an external stg file. For example my assignment rule is:

assignment : leftValue DEFINES rightValue -> assignment(left={$leftValue.text}, right={$rightValue.text});

As my grammar is quite simple, I'd like to get rid of the external file. Is there a way I can do all the templating inline?


Thanks,
  András
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081206/26743738/attachment.html 


More information about the antlr-interest mailing list