[antlr-interest] Using ANTLRv3

Terence Parr parrt at cs.usfca.edu
Fri May 4 08:25:17 PDT 2007


make that STRING.  string puts in parser.  ~ONLYTOKEN is empty set.   
~char is all other chars.
Ter
On May 4, 2007, at 2:42 AM, Gavin Lambert wrote:

> At 21:18 4/05/2007, Stefan wrote:
> >string	:	'"' (~'"')+ '"';
> >
> >D:\ANTLR\pliki>java org.antlr.Tool Test2.g
> >no such locale file
> >org/antlr/tool/templates/messages/languages/pl.stg
> >retrying with English locale
> >ANTLR Parser Generator  Version 3.0b7 (April 12, 2007)  1989-2007
> >error(139): Test2.g:3:16: set complement ~'"' is empty
> >warning(201): Test2.g:3:19: The following alternatives are
> >unreachable: 1
> >
> >What's wrong? I guess that I only mention the '"' character, so
> >the complement is empty. How do I specify the character set?
>
> That sounds similar to a bug from somewhere between b6 and b7 -- it  
> erroneously treated sequences of characters as sets.  That was  
> supposed to be fixed in b7, though, and yur later mention of  
> problems recognising EOF tokens etc are a bit odd.
>
> Could you make a minimal-reproducing test case and post the entire  
> grammar here?  Maybe it's something odd elsewhere in the file...
>
> Another option is to try upgrading to one of the daily builds, it  
> might help.
>



More information about the antlr-interest mailing list