[antlr-interest] passing arguments to the templates

swathy murthy pskswathy at gmail.com
Thu Mar 4 10:36:46 PST 2010


Hi

I have attached my grammar file and the template file. Now, I need to
pass the value of the LITERAL in the rule expr to outer_template() in
rule stat.
I am directly using outer_template(var={$LITERAL.text}) but this is
not working. It gives the error that it cannot find the symbol
LITERAL.text as it is not present in the rule stat. So, how should I
pass the argument to the template.
Help would be appreciated.

Thanks a lot.
Swathy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sal_prog_template.stg
Type: application/octet-stream
Size: 791 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100305/10119a52/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.g
Type: application/octet-stream
Size: 817 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100305/10119a52/attachment-0001.obj 


More information about the antlr-interest mailing list