From 6f6ff0e39eb6d771ef5336394079646ccdc18bd5 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 7 Nov 2017 15:44:40 +0100 Subject: Use Zarith instead of Num for computing numbers --- odf/odf_ExpressionLexer.mll | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'odf/odf_ExpressionLexer.mll') diff --git a/odf/odf_ExpressionLexer.mll b/odf/odf_ExpressionLexer.mll index 1db73c3..7f6a55b 100755 --- a/odf/odf_ExpressionLexer.mll +++ b/odf/odf_ExpressionLexer.mll @@ -26,8 +26,8 @@ let cell = letters+ digit+ rule read = parse | space+ { read lexbuf } - | digit+ as _1 { NUM (_1, Num.num_of_string _1)} - | real as _1 { REAL (Tools.String.filter_float _1, Tools.Num.of_float_string _1)} + | digit+ as _1 { NUM _1} + | real as _1 { REAL (Tools.String.filter_float _1)} | '$' { DOLLAR } | '=' { EQ } @@ -58,14 +58,14 @@ rule read = parse and read_string buf = parse | '"' { STR (Buffer.contents buf) } - | '\\' '/' { Buffer.add_char buf '/'; read_string buf lexbuf } - | '\\' '\\' { Buffer.add_char buf '\\'; read_string buf lexbuf } - | '\\' 'b' { Buffer.add_char buf '\b'; read_string buf lexbuf } + | '\\' '/' { Buffer.add_char buf '/'; read_string buf lexbuf } + | '\\' '\\' { Buffer.add_char buf '\\'; read_string buf lexbuf } + | '\\' 'b' { Buffer.add_char buf '\b'; read_string buf lexbuf } | '\\' 'f' { Buffer.add_char buf '\012'; read_string buf lexbuf } - | '\\' 'n' { Buffer.add_char buf '\n'; read_string buf lexbuf } - | '\\' 'r' { Buffer.add_char buf '\r'; read_string buf lexbuf } - | '\\' 't' { Buffer.add_char buf '\t'; read_string buf lexbuf } - | '\\' '"' { Buffer.add_char buf '"'; read_string buf lexbuf } + | '\\' 'n' { Buffer.add_char buf '\n'; read_string buf lexbuf } + | '\\' 'r' { Buffer.add_char buf '\r'; read_string buf lexbuf } + | '\\' 't' { Buffer.add_char buf '\t'; read_string buf lexbuf } + | '\\' '"' { Buffer.add_char buf '"'; read_string buf lexbuf } | [^ '"' '\\' '\000']+ { Buffer.add_string buf (Lexing.lexeme lexbuf); read_string buf lexbuf -- cgit v1.2.3