This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
compilation/cours/cours-02/lexer.mll
Adrien Guatto abf23ab803 Cours 02
2023-09-27 18:49:08 +02:00

15 lines
187 B
OCaml

{
(* Prelude *)
open Parser
}
rule token = parse
| ['0'-'9']+ as x { INT (int_of_string x) }
| '+' { PLUS }
| '*' { STAR }
| ' ' { token lexbuf }
| eof { EOF }
{
(* Postlude *)
}