[antlr-interest] Dealing With "missing attribute access on rule scope"
Randall R Schulz
rschulz at sonic.net
Thu Sep 6 11:22:24 PDT 2007
Hi,
I have this grammar rule
interpretableName
: BareName
| EnclosedName
;
There are a few places in my grammar where I want to take the Token
yielded by this rule and pass it to some Java action code:
binding
returns [ Variable var ]
: interpretableName
{
$var = makeIndividualVariable($interpretableName);
}
But I get the ever-popular diagnostic:
error(117): CLIFBuilder.g:0:0: missing attribute access on rule scope: interpretableName
This is a tree parser:
tree grammar CLIFBuilder;
How do I get the whole Token in the "binding" rule above?
Thanks.
Randall Schulz
More information about the antlr-interest
mailing list