diff options
Diffstat (limited to 'src/lexer.mll')
| -rw-r--r-- | src/lexer.mll | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lexer.mll b/src/lexer.mll index fb091f67..3b1a1583 100644 --- a/src/lexer.mll +++ b/src/lexer.mll @@ -42,6 +42,7 @@ { open Parser +open Big_int module M = Map.Make(String) exception LexError of string * Lexing.position @@ -321,8 +322,8 @@ rule token = parse | (digit+ as i1) "." (digit+ as i2) { (Real (i1 ^ "." ^ i2)) } | "-" (digit* as i1) "." (digit+ as i2) { (Real ("-" ^ i1 ^ "." ^ i2)) } - | digit+ as i { (Num(int_of_string i)) } - | "-" digit+ as i { (Num(int_of_string i)) } + | digit+ as i { (Num(big_int_of_string i)) } + | "-" digit+ as i { (Num(big_int_of_string i)) } | "0b" (binarydigit+ as i) { (Bin(i)) } | "0x" (hexdigit+ as i) { (Hex(i)) } | '"' { (String( |
