dcsimg
Lexer rule ('0'..'9')+ does not identify 0
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gamaka_Perera
Posted On:   Tuesday, October 8, 2002 04:02 AM

I have a Lexer with following rule,



			
				
IntLit
:
( ('0'..'9')+ ( '.' ('0'..'9')* )?
)
;




which I use to represent all numbers (integer and real both).



This work fine for all except 0 (a single zero).



I have tried the rule for other single numbers and rule works fine for them.
About | Sitemap | Contact