diff options
| author | Brian Campbell | 2017-08-10 16:53:01 +0100 |
|---|---|---|
| committer | Brian Campbell | 2017-08-10 16:53:01 +0100 |
| commit | 5c01bf4c78860b1173b156f99d03f115d08e2175 (patch) | |
| tree | a6149f41ecead71254e8f76ac5caa200be18858f /src/process_file.ml | |
| parent | 3d574f2dfe688d762976f30661d46f806227ba22 (diff) | |
| parent | 128c1965e58d1527c0619d777b5770ec5825ae22 (diff) | |
Merge branch 'experiments' into mono-experiments
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index c9a4f178..91262ce9 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -40,6 +40,8 @@ (* SUCH DAMAGE. *) (**************************************************************************) +let opt_new_parser = ref false + type out_type = | Lem_ast_out | Lem_out of string option @@ -71,7 +73,11 @@ let parse_file (f : string) : Parse_ast.defs = close_in in_chan; let lexbuf, in_chan = get_lexbuf f in try - let ast = Parser.file Lexer.token lexbuf in + let ast = + if !opt_new_parser + then Parser2.file Lexer2.token lexbuf + else Parser.file Lexer.token lexbuf + in close_in in_chan; ast with | Parsing.Parse_error -> @@ -90,7 +96,6 @@ let load_file order env f = let ast = convert_ast order (parse_file f) in Type_check.check env ast -let opt_new_typecheck = ref false let opt_just_check = ref false let opt_ddump_tc_ast = ref false let opt_dno_cast = ref false |
