Commits

Sébastien Ferré committed 9d1a845

Now, floats must have at least one digit after the '.'
to avoid confusion with tokens 'Dot' and 'DotDot'.

Comments (0)

Files changed (1)

     { Ident(Lexing.lexeme lexbuf) }
 | ['+' '-']? digit+
     { Int(int_of_string(Lexing.lexeme lexbuf)) }
-| ['+' '-']? digit+ '.' digit* (['e' 'E'] ['+' '-']? digit+)?
+| ['+' '-']? digit+ '.' digit+ (['e' 'E'] ['+' '-']? digit+)?
     { Float(float_of_string(Lexing.lexeme lexbuf)) }
 | '`' _ '`'
     { Char((Lexing.lexeme lexbuf).[1]) }