diff options
| author | Kathy Gray | 2013-07-24 18:01:44 +0100 |
|---|---|---|
| committer | Kathy Gray | 2013-07-24 18:01:44 +0100 |
| commit | fc706f3d44317dd316b0e89fe8b730e665adaa39 (patch) | |
| tree | 73055b4da5f20c5ec5342dcf10d56852ae2157ba /src/process_file.ml | |
| parent | 6a82ed006eb4cc816088cc7557030f75965e0cb1 (diff) | |
Parser compiles and compiles some very small test programs.
Output is only given in the event of a parse or lex failure (with poor reporting for now)
There are still 10 shift/reduce conflicts that may need further investigating and a few syntax changes that need discussion.
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index 5c7e4680..fe164957 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -56,9 +56,10 @@ let get_lexbuf fn = Lexing.pos_cnum = 0; }; lexbuf -let parse_file (f : string) : (bool Ast.defs * Ast.lex_skips) = +let parse_file (f : string) : (Parse_ast.defs * Parse_ast.lex_skips) = let lexbuf = get_lexbuf f in - try + Parser.file (Lexer.token []) lexbuf +(* try Parser.file (Lexer.token []) lexbuf with | Parsing.Parse_error -> @@ -67,7 +68,7 @@ let parse_file (f : string) : (bool Ast.defs * Ast.lex_skips) = | Ast.Parse_error_locn(l,m) -> raise "Parse error 2" (*Reporting_basic.Fatal_error (Reporting_basic.Err_syntax_locn (l, m))*) | Lexer.LexError(c,p) -> - raise "Lex error" (*Reporting_basic.Fatal_error (Reporting_basic.Err_lex (p, c))*) + raise "Lex error" (*Reporting_basic.Fatal_error (Reporting_basic.Err_lex (p, c))*)*) (* type instances = Types.instance list Types.Pfmap.t |
