17 lines
224 B
OCaml
17 lines
224 B
OCaml
type token =
|
|
| INT of (string)
|
|
| ID of (string)
|
|
| PLUS
|
|
| MINUS
|
|
| TIMES
|
|
| DIV
|
|
| LPAREN
|
|
| RPAREN
|
|
| ASSIGN
|
|
| IN
|
|
| IMPLY
|
|
| FUNC
|
|
| EOL
|
|
|
|
val main :
|
|
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> Ast.ast
|