21 lines
328 B
OCaml
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()
|