[antlr-interest] Logic like ~ for parsing

Gavin Lambert antlr at mirality.co.nz
Mon Mar 8 11:04:19 PST 2010


At 05:02 9/03/2010, Kirby Bohling wrote:
 >So if I had (^V T1 T2) (^V T3) (^V T4 T5), is there a way in a
 >tree parse to turn that into (^V T1 T2 T3 T4 T5)?

In theory, something like this should do that:

sequential_V
   : ^(V (x+=.)+) (^(V (x+=.)+)* -> ^(V $x+)
   ;



More information about the antlr-interest mailing list