You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I need to use some string operations to achieve it:
let rec token buf =
match%sedlex buf with
| FLOAT, "%" ->
let x = Sedlexing.Utf8.lexeme buf in
let x = String.sub x 0 (String.length x -1) in
DOUBLE ((float_of_string x) /. 100. )
I'm wondering if we could simplify that, e.g., by using as like in ocamllex.
The text was updated successfully, but these errors were encountered:
I'm new to sedlex. I'm translating a lexer in ocamllex to sedlex. By ocamllex, I have e.g.,
Now, I need to use some string operations to achieve it:
I'm wondering if we could simplify that, e.g., by using
as
like in ocamllex.The text was updated successfully, but these errors were encountered: