[antlr-interest] passing arguments to the templates

Gokulakannan Somasundaram gokul007 at gmail.com
Thu Mar 4 22:14:30 PST 2010


 Keep track of things using a hashmap.
insert into the hashmap at expr and retrieve them at stat and pass it to the
template.

Gokul.


On Fri, Mar 5, 2010 at 12:06 AM, swathy murthy <pskswathy at gmail.com> wrote:

> 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
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>


More information about the antlr-interest mailing list