[antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope
David-Sarah Hopwood
david-sarah at jacaranda.org
Fri Oct 16 14:15:07 PDT 2009
Kaleb Pederson wrote:
> I'm getting an error that doesn't make any sense, either because I've
> missed something fundamental or I've stumbled across a bug. I'm doing
> some type checking within a tree parser. I have a plusMinusExpression
> which can either be a negation or a subtraction expression. In order
> to to check to see which it is, I have `if ($rhs != null)` within my
> action. That line, however, causes the following error:
>
> SemanticChecker.g:163:3: missing attribute access on rule scope: rhs
You can use "if ($rhs.tree != null)".
--
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
More information about the antlr-interest
mailing list