[antlr-interest] Bug with Java Module Operator
Terence Parr
parrt at cs.usfca.edu
Tue May 8 14:42:35 PDT 2007
On May 8, 2007, at 2:17 PM, Gavin Lambert wrote:
> At 09:08 9/05/2007, Scott Fortmann-Roe wrote:
> >Using AST rewrite rules, the following throws an error:
> >
> >(op+='!'|'not')* negationExpr -> {$op != null && ($op.size() %
> >2)==1}? ^(NOT negationExpr)
> >
> >Something about invalid string template shorthand '%'.
>
> Are you sure you're allowed to put semantic predicates there? It
> looks like it ought to be before the arrow (which would make it a
> validation predicate).
You can use preds in front of multiple ->
a : ...
-> {...}? ...
-> {...}? ...
-> ...
;
More information about the antlr-interest
mailing list