eprintf "%a: parse error\n" print_position lexbuf;
exit 1
-let () =
- let filename = "Goalfile" in
+let parse_from_file filename =
let fp = open_in filename in
let lexbuf = Lexing.from_channel fp in
lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = filename };
let file : Ast.file = parse lexbuf in
close_in fp;
-
- Ast.print_file stdout file
+ file