[antlr-interest] ANTLR + StringTemplate + .stg

Tomasz Uliński tu219717 at gmail.com
Mon Mar 16 08:23:39 PDT 2009


Hi,

I have tree grammar with (output = template).
I use inside my grammar templates from some group (external .stg file)
What should I do to make this work together?

I found "Template construction" examples
(http://www.antlr.org/wiki/display/ANTLR3/Template+construction),
which use named templates from external file, but I can't find example
of code (main function), which do following
1. inputFile -> (grammar output=AST) -> AST
2. AST -> (tree grammar output=template - templates from external .stg
file) -> code

I'm looking "de facto" for sth like (Interfacing AST with Java -
http://www.antlr.org/wiki/display/ANTLR3/Interfacing+AST+with+Java),
but about interfacing StringTemplate used by ANTLR grammar.

I will be very grateful for your help,
Best Regards,
Tomasz Ulinski


More information about the antlr-interest mailing list