This repository has been archived on 2022-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
compilateurMIPS/parser.mly
2022-12-06 20:39:15 +01:00

23 lines
210 B
OCaml

%{
open Ast
open Ast.Syntax
%}
%token <int> Lint
%token Lend
%start prog
%type <Ast.Syntax.expr> prog
%%
prog:
| e = expr; Lend { e }
;
expr:
| n = Lint {
Int { value = n ; pos = $startpos(n) }
}
;