Commits

Sébastien Ferré  committed 5a788b7

In parsing of floats: now, there may be no digit before the dot.

  • Participants
  • Parent commits 79dbd1b

Comments (0)

Files changed (1)

     { Term(Lexing.lexeme lexbuf) }
 | ['+' '-']? digit+
     { Int(int_of_string(Lexing.lexeme lexbuf)) }
-| ['+' '-']? digit+ '.' digit* (['e' 'E'] ['+' '-']? digit+)?
+| ['+' '-']? digit* '.' digit* (['e' 'E'] ['+' '-']? digit+)?
     { let s = String.lowercase (Lexing.lexeme lexbuf) in
       Float(float_of_string s, prec_of_sfloat s) }
 | '`' _ '`'