X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2Ftest_parser.ml;h=1813fd641457953419cb74324ca1312eda26c082;hb=8d1ad60ac8b898d29d12136642cbd0b7a1ca6018;hp=fdab36ef329c589532acbe66bd7b497e75f6a93d;hpb=aba014724c9ad08f80944ec3021c9fa3826dca4a;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/test_parser.ml b/helm/ocaml/cic_disambiguation/test_parser.ml index fdab36ef3..1813fd641 100644 --- a/helm/ocaml/cic_disambiguation/test_parser.ml +++ b/helm/ocaml/cic_disambiguation/test_parser.ml @@ -24,15 +24,15 @@ *) try - let ic = open_in Sys.argv.(1) in - let term = Parser.parse_term (Stream.of_channel ic) in + let ic = + (try + open_in Sys.argv.(1) + with Invalid_argument _ -> stdin) + in + let term = CicTextualParser2.parse_term (Stream.of_channel ic) in close_in ic; - print_endline (Pp.pp_term term) + print_endline (CicTextualParser2Pp.pp_term term) with Stdpp.Exc_located ((p_start, p_end), exn) -> prerr_endline (Printf.sprintf "Exception at character %d-%d: %s" p_start p_end (Printexc.to_string exn)) -(* print_endline (Macro.expand "def") *) - -(* Printf.printf "'%s'\n" (Macro.expand Sys.argv.(1)) *) -