[antlr-interest] Root note of tree doesn't have the index attribute?
Bernardo Elayda
belayda at gmail.com
Sun Mar 23 16:45:20 PDT 2008
Hi,
I'm having trouble with the following in a tree grammar:
myrule : ^(a='=' b=NODE c=NODE) -> mytemplate(mya={$a.index},
myb={$b.text},myc={$c.text}) ;
When I compile the above rule and compile the resulting java file, I get an
error that says it cannot find the method getTokenIndex for 'a'. That
doesn't make sense to me. Isn't the root node labeled as 'a' above just a
token? If I change the above template to use $a.text, that works.
tia,
Bernardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080323/406373e2/attachment.html
More information about the antlr-interest
mailing list