[antlr-interest] substitution for a node during parsing

Martin Probst mail at martin-probst.com
Fri Jul 15 18:00:49 PDT 2005


> alternation    :       concatenation ( !a:SLASH  b:concatenation {
>                 #a=#([ALTERNATION,"ALT|"],#b);
>                 astFactory.makeASTRoot(currentAST, #a);
> } )*
>                     ;

Try

alternation: c1:concatenation 
             ( SLASH! c2:concatenation! 
               { ## = #( [ALTERNATION,"ALT|"], #c2, ## ); } 
             )*

Regards,
Martin



More information about the antlr-interest mailing list