[antlr-interest] Using ANTLRv3

Stefan jan_ek at op.pl
Fri May 4 05:30:59 PDT 2007


Sorry, wrong mail address. This time posting to the mailing list.

Gavin Lambert napisał(a):
 > 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...

Nope. The complete file is just this:

grammar Test2;

string	:	'"' (~'"')+ '"';


Stefan Chrobot




More information about the antlr-interest mailing list