diff options
Diffstat (limited to 'src/lexer2.mll')
| -rw-r--r-- | src/lexer2.mll | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lexer2.mll b/src/lexer2.mll index e43bd3e1..04ecdca3 100644 --- a/src/lexer2.mll +++ b/src/lexer2.mll @@ -50,7 +50,7 @@ { open Parser2 -open Big_int +module Big_int = Nat_big_num open Parse_ast module M = Map.Make(String) exception LexError of string * Lexing.position @@ -229,13 +229,13 @@ rule token = parse | "<=" { (LtEq(r"<=")) } | "infix" ws (digit as p) ws (operator as op) { operators := M.add op (mk_operator Infix (int_of_string (Char.escaped p)) op) !operators; - Fixity (Infix, big_int_of_string (Char.escaped p), op) } + Fixity (Infix, Big_int.of_string (Char.escaped p), op) } | "infixl" ws (digit as p) ws (operator as op) { operators := M.add op (mk_operator InfixL (int_of_string (Char.escaped p)) op) !operators; - Fixity (InfixL, big_int_of_string (Char.escaped p), op) } + Fixity (InfixL, Big_int.of_string (Char.escaped p), op) } | "infixr" ws (digit as p) ws (operator as op) { operators := M.add op (mk_operator InfixR (int_of_string (Char.escaped p)) op) !operators; - Fixity (InfixR, big_int_of_string (Char.escaped p), op) } + Fixity (InfixR, Big_int.of_string (Char.escaped p), op) } | operator as op { try M.find op !operators with Not_found -> raise (LexError ("Operator fixity undeclared " ^ op, Lexing.lexeme_start_p lexbuf)) } @@ -252,8 +252,8 @@ rule token = parse else Id(r i) } | (digit+ as i1) "." (digit+ as i2) { (Real (i1 ^ "." ^ i2)) } | "-" (digit* as i1) "." (digit+ as i2) { (Real ("-" ^ i1 ^ "." ^ i2)) } - | digit+ as i { (Num(big_int_of_string i)) } - | "-" digit+ as i { (Num(big_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( |
