Skip to content
Browse files

[feature] libbase/jsonLex.ml: anormal float extension

  • Loading branch information...
1 parent 3aec545 commit b0fead48167ddfb19ae5376abbc3f342c8c7604c @OpaOnWindowsNow OpaOnWindowsNow committed Apr 3, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 libbase/jsonLex.ml
View
7 libbase/jsonLex.ml
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -55,7 +55,12 @@ let rec get_token = lexer
| ':' -> JP.COLON
| ',' -> JP.COMMA
| t_int -> JP.INT (int_of_string (Ulexing.utf8_lexeme lexbuf))
+
+ | "NaN"
+ | "Infinity"
+ | "-Infinity"
| t_number -> JP.FLOAT (float_of_string (Ulexing.utf8_lexeme lexbuf))
+
| "true" -> JP.TRUE
| "false" -> JP.FALSE
| "null" -> JP.NIL

0 comments on commit b0fead4

Please sign in to comment.
Something went wrong with that request. Please try again.