[antlr-interest] ANTLR + ST Question

fridi fridi70 at gmx.de
Thu Sep 16 13:35:58 PDT 2010


  Hi,

I have a parser grammar that generates code using ST.

One rule is

andExpression
     :
     c1=condintion (AND c2+=condition)* -> andExpressionTmpl(c1={c1.st}; 
c2={c2})
     ;


So the rule consumes a first condition, and afterwords it accumulates 
all following conditions into c2.
For something like A AND B AND C where (A,B,C are conditions), it would 
process A,B,C in one template call.
Is it possible to get working like (A AND) AND C? (w/o using tree grammar?)

Thanks for any hint,
   Fridi



More information about the antlr-interest mailing list