[antlr-interest] Lexer question
dotnet fr
dotnetfr at gmail.com
Thu Jul 27 00:39:18 PDT 2006
Hi Everyone,
I have a problem about the antlr lexer.
In input I have :
10;
1500;
0.50;
In my lexer I have :
DOUBLE : ('-')? ('0'..'9')+ '.' ('0'..'9')* ;
INTEGER : ('0'..'9')+ ;
SEMICOLON : ';' ;
In my parser and lexer I have k=5.
But I've got an error, the lexer seems to get his TOKENS in the order.
It gets the 10 like a double (the first in the list) and send an
exception
(exception: expecting ''.'', found '';'')
I want the lexer to skip and try the next TOKEN and send an exception
only if there isn't any solutions.
Is anyone got this problem too ?
Cheers,
Tomy
More information about the antlr-interest
mailing list