RosettaCodeData/Task/Literals-Floating-point/Python/literals-floating-point-1.py
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

11 lines
212 B
Python

FLOAT
: '.' DIGITS (Exponent)?
| DIGITS '.' Exponent
| DIGITS ('.' (DIGITS (Exponent)?)? | Exponent)
;
DIGITS : ( '0' .. '9' )+ ;
Exponent
: ('e' | 'E') ( '+' | '-' )? DIGITS
;