[antlr-interest] Root node transformation

Bryan Ewbank ewbank at gmail.com
Mon Jun 20 12:18:40 PDT 2005


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


On 6/20/05, Jeff Dahl <jddahl at micron.com> wrote:
> Is it possible to transform the tree:
>     #( A #( B C D ) E ... )
> to
>     #( B C D E ... )


More information about the antlr-interest mailing list