pieuvre/main.ml
2024-04-16 10:07:09 +02:00

21 lines
328 B
OCaml

open Affichage
open Typing
let interpret e =
begin
print_expr e;
print_newline();
print_ty (typeinfer [] e);
print_newline()
end
let lexbuf = Lexing.from_channel stdin
let parse () = Parser.main Lexer.token lexbuf
let calc () =
let result = parse () in
interpret result; flush stdout
let _ = calc()