diff options
| author | Kathy Gray | 2016-06-01 15:31:07 +0100 |
|---|---|---|
| committer | Kathy Gray | 2016-06-02 14:31:14 +0100 |
| commit | a7444668fa306775a69f5ed256ca3eaef966ef98 (patch) | |
| tree | 1df41b527380472a8195e2fe22fd0e1273e63812 /src/process_file.ml | |
| parent | 668422f2f2f0bfdac0713795301a1527d2da8a7f (diff) | |
improve constraint range checking
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index ec0d8d08..870daba4 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -51,8 +51,6 @@ type out_type = | Lem_out of string option | Ocaml_out of string option -(* let r = Ulib.Text.of_latin1 *) - let get_lexbuf fn = let lexbuf = Lexing.from_channel (open_in fn) in lexbuf.Lexing.lex_curr_p <- { Lexing.pos_fname = fn; @@ -130,7 +128,7 @@ let close_output_with_check (o, temp_file_name, file_name) = let generated_line f = Printf.sprintf "Generated by Sail from %s." f -let output1 libpath out_arg filename defs (* alldoc_accum alldoc_inc_accum alldoc_inc_usage_accum*) = +let output1 libpath out_arg filename defs = let f' = Filename.basename (Filename.chop_extension filename) in match out_arg with | Lem_ast_out -> @@ -204,30 +202,9 @@ let output1 libpath out_arg filename defs (* alldoc_accum alldoc_inc_accum alldo close_output_with_check ext_o -let output libpath out_arg files (*alldoc_accum alldoc_inc_accum alldoc_inc_usage_accum*) = +let output libpath out_arg files = List.iter (fun (f, defs) -> - output1 libpath out_arg f defs (*alldoc_accum alldoc_inc_accum alldoc_inc_usage_accum*)) + output1 libpath out_arg f defs) files - -(*let output_alldoc f' fs alldoc_accum alldoc_inc_accum alldoc_inc_usage_accum = - let rs = !alldoc_accum in - let (o, ext_o) = open_output_with_check (f' ^ ".tex") in - Printf.fprintf o "%%%s\n" (generated_line fs); - Printf.fprintf o "%s" tex_preamble; - Printf.fprintf o "%s" (Ulib.Text.to_string (Ulib.Text.concat (r"") rs)); - Printf.fprintf o "%s" tex_postamble; - close_output_with_check ext_o; - let rs = !alldoc_inc_accum in - let (o, ext_o) = open_output_with_check (f' ^ "-inc.tex") in - Printf.fprintf o "%%%s\n" (generated_line fs); - Printf.fprintf o "%s" (Ulib.Text.to_string (Ulib.Text.concat (r"") rs)); - close_output_with_check ext_o; - let rs = !alldoc_inc_usage_accum in - let (o, ext_o) = open_output_with_check (f' ^ "-use_inc.tex") in - Printf.fprintf o "%%%s\n" (generated_line fs); - Printf.fprintf o "%s" (Ulib.Text.to_string (Ulib.Text.concat (r"") rs)); - close_output_with_check ext_o - -*) |
