Hello
ANTLRWorks can automatically generate
FLOAT
: ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
| '.' ('0'..'9')+ EXPONENT?
| ('0'..'9')+ EXPONENT
;
fragment
EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
But I want a FLOAT that doesn't require an exponent:
FLOAT_NOE2
: '.' ('0'..'9')+
| ('0'..'9')+ ('.' ('0'..'9')* )?
;
It seems that this should recognize any of these: 1.2 .3 4
But this doesn't recognize 4. I cant find a branch in the generated
Lexer that doesn't enter '.' ( '0' .. '9' )*
Also
FLOAT
: ('0'..'9')+ '.' ('0'..'9')*
| '.' ('0'..'9')+
| ('0'..'9')+
;
doesn't recognize 4, but I've not examined that lexer.
Do I misunderstand lexer syntax or is this a Lexer generator bug?
Regards
Arthur
--
Senior Research Scientist
Computational Biology
Memorial Sloan-Kettering Cancer Center
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.