[antlr-interest] Root node transformation
Bryan Ewbank
ewbank at gmail.com
Mon Jun 20 13:41:09 PDT 2005
Hmm; that's funny. There's reference in antlr.pdf on pg 122, but it's
only "#id"; rather than "##". I think I picked that up from the
examples, or from the newsgroup... "##" means the same thing as
"#rulename" for any rule, and eliminates some cut-n-paste errors for
me.
On 6/20/05, Jeff Dahl <jddahl at micron.com> wrote:
> Bryan Ewbank wrote:
>
> >// #(A (# B C D ) (.)* ) ==> #(B C D ... )
> >levelizer:
> > #( A
> > #( B C D )
> > { ## = #B; }
> > (
> > extra:. { ##->addChild(#extra); }
> > )*
> > )
> >
> Thanks for the quick response. Can you point me to where the ## is
> documented further?
>
> Jeff Dahl
More information about the antlr-interest
mailing list