[antlr-interest] Lexer bug? (with test cases!)
Clifford Heath
clifford.heath at gmail.com
Tue Oct 23 05:32:31 PDT 2007
Gavin Lambert wrote:
> Just to follow up on this, I ran a few tests just now (against 3.0.1)
> and inlining it doesn't help.
Gavin,
Did you see my message where I said that I got the following to work?
Admittedly I haven't run a comprehensive suite of test cases over it.
NUMBER
: '0'
| '0' ('0'..'7')+ // An octal integer
| '0' 'x' HEXDIGIT+ // A hexadecimal integer
| SIGN? '1'..'9' DIGIT* // A decimal integer
| SIGN? DIGIT+ FRACTION // a real number
| SIGN? DIGIT+ EXPONENT
| SIGN? DIGIT+ FRACTION EXPONENT
| SIGN? FRACTION EXPONENT?
;
... with the range grammar I shared earlier.
Clifford Heath.
More information about the antlr-interest
mailing list