[antlr-interest] Root node transformation

Paul Johnson gt54-antlr at cyconix.com
Mon Jun 20 14:14:27 PDT 2005


Bryan Ewbank wrote:
> // #(A (# B C D ) (.)* ) ==>  #(B C D ... )
> levelizer:
>   #( A
>        #( B C D )
>        { ## = #B; }
>        (
>            extra:. { ##->addChild(#extra); }
>        )*
>    )

Should this be ## = #(B,C,D), rather than ## = #B?

And can you use labels here:
#(A
   b:#(B,C,D) {## = #b; }
   ...
?

Thanks -

Paul



More information about the antlr-interest mailing list