diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-07 15:44:40 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-08 14:05:56 +0100 |
commit | 6f6ff0e39eb6d771ef5336394079646ccdc18bd5 (patch) | |
tree | f06907f88972e8e87c5924de8eb225362a4a775b /odf/odf_ExpressionLexer.mll | |
parent | 50c16c8fc79d349f9db9d7975d1ae4e57050b648 (diff) |
Use Zarith instead of Num for computing numbers
Diffstat (limited to 'odf/odf_ExpressionLexer.mll')
-rwxr-xr-x | odf/odf_ExpressionLexer.mll | 18 |
1 files changed, 9 insertions, 9 deletions
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 |