[antlr-interest] bug in tree parser code gen related to rule scopes?
Tom Smith
yotommy at gmail.com
Wed Dec 5 13:50:55 PST 2007
On Dec 5, 2007 4:45 PM, Mark Volkmann <r.mark.volkmann at gmail.com> wrote:
> I have the following in my tree grammar MathTree.g.
>
> polynomial returns [Polynomial result]
> scope {
> Polynomial current;
> }
> : ^(POLYNOMIAL term*) {
> $result = $polynomial.current = new Polynomial();
> }
> ;
I *think* you should express this as $polynomial::current.
More information about the antlr-interest
mailing list