[antlr-interest] lexer problem...

Lloyd Dupont ld at galador.net
Thu Jul 19 06:13:19 PDT 2007


I have the following lexer rule:
==============
FLOAT : ('0'..'9')+ '.' ('0'..'9')+ (EXPONENT_PART)? (FLOAT_TYPE_SUFFIX)?
 ;
==============
as you can see: it require 1 or more number on both side of the DOT

my problem is that with the follwoing input:


====
1.ToString()
====

instead of returning INT DOT ID
it apparently try to return a FLOAT and I have the following error message when trying on the command line:
====
line 1:2 required (...)+ loop did not match anything at character 'T'
====

Any idea how to solve this lexer problem??

Thanks! :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070719/7d461781/attachment.html 


More information about the antlr-interest mailing list