[antlr-interest] Previous rule element reference in a scope

Peter Kooiman peter at crispu.com
Thu Apr 14 03:35:45 PDT 2011


> You're correct, Peter, it is not limited to only method calls. I don't
> think parameter passing will work, since the enclosed statement block
> is not part of the withStatement rule.

There's your problem..the enclosed block needs to be part of the withStatement rule I would say (how else would you decide when the object in the with statement goes out of scope?). Once you bring the enclosed block into the rule, you will be able to reference the enclosing withStatement rule scope.



More information about the antlr-interest mailing list