[antlr-interest] 2 or 3 (major?) bugs in ANTLR (C#)

Gavin Lambert antlr at mirality.co.nz
Fri Jul 6 01:36:11 PDT 2007


At 17:10 6/07/2007, David Piepgrass wrote:
 >BUG: ('_' | {false}? . | {false}? .)+; // Version 1
 >BUG: ('_' | {false}? .)+; // Version 2
 >BUG: ('_')+; // Version 3

Have you tried using '{false}? => .'?

 >@lexer::members {
 >	public bool IsWS(int LA)        { int c = input.LA(LA); return 
c
 >== ' ' || c == '\t'; }
 >	public bool IsNewline(int LA)   { int c = input.LA(LA); return 
c
 >== '\r' || c == '\n'; }
 >	public bool IsCtrlChar(int LA)  { int c = input.LA(LA); return 
c <
 >32; }
 >	public bool IsBackslash(int LA) { int c = input.LA(LA); return 
c
 >== '\\'; }
 >}

Shouldn't those be 'char' variables?



More information about the antlr-interest mailing list