[antlr-interest] ANTLR3.0b2 - rule STRING uses rewrite syntax or operator with no output option

Terence Parr parrt at cs.usfca.edu
Wed Jul 19 17:40:31 PDT 2006


On Jul 18, 2006, at 8:57 AM, David CROSSON wrote:

> I got a grammar  with this rule :
> ...
> options {
>     filter=true;
>     output=AST;
> }
> ...
> STRING : '"'! (~'"')* '"'! ;
> ...
>
> Using latest release of ANTLR I now got this error :
> "jrockit.g:246:13: rule STRING uses rewrite syntax or operator with  
> no output option"
> I'm using the ! operator elsewhere without any problem but within a  
> lexer rule I got this strange
> errormessage, no error with ea8.

Wow!  Oh, that's a lexer rule with ! in it.  Illegal.  Remove and it  
should work.

Ter



More information about the antlr-interest mailing list