Project

General

Profile

Revision e8f55c25 src/parsers/lexer_lustre.mll

View differences:

src/parsers/lexer_lustre.mll
119 119
| blank +
120 120
    {token lexbuf}
121 121
| ((['0'-'9']+ as l)  '.' (['0'-'9']* as r) ('E'|'e') (('+'|'-')? ['0'-'9']+ as exp)) as s
122
    {REAL (Num.num_of_string (l^r), String.length r + -1 * int_of_string exp , s)}
122
    {REAL (Real.create (l^r) (String.length r + -1 * int_of_string exp) s)}
123 123
| ((['0'-'9']+ as l) '.' (['0'-'9']* as r)) as s
124
    {REAL (Num.num_of_string (l^r), String.length r, s)}
124
    {REAL (Real.create (l^r) (String.length r) s)}
125 125
| ['0'-'9']+ 
126 126
    {INT (int_of_string (Lexing.lexeme lexbuf)) }
127 127
| "tel." {TEL}

Also available in: Unified diff