summaryrefslogtreecommitdiff
path: root/frontend/file_parser.ml
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/file_parser.ml')
-rw-r--r--frontend/file_parser.ml17
1 files changed, 0 insertions, 17 deletions
diff --git a/frontend/file_parser.ml b/frontend/file_parser.ml
deleted file mode 100644
index 85eb9cd..0000000
--- a/frontend/file_parser.ml
+++ /dev/null
@@ -1,17 +0,0 @@
-open Ast
-open Ast_printer
-open Lexing
-
-let parse_file (filename : string) : prog =
- let f = open_in filename in
- let lex = from_channel f in
- try
- lex.lex_curr_p <- { lex.lex_curr_p with pos_fname = filename; };
- Parser.file Lexer.token lex
- with
- | Parser.Error ->
- Util.error (Printf.sprintf "Parse error (invalid syntax) near %s"
- (string_of_position lex.lex_start_p))
- | Failure "lexing: empty token" ->
- Util.error (Printf.sprintf "Parse error (invalid token) near %s"
- (string_of_position lex.lex_start_p))