]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/test_parser.ml
snapshot
[helm.git] / helm / ocaml / cic_notation / test_parser.ml
index 53ee4f8eb268a7c8f7829a637ab6e7a7e4dabb51..99e7371fcee50d0099f1e3a47d785fefd73b6483 100644 (file)
@@ -35,11 +35,11 @@ let _ =
   let arg_spec = [ "-level", Arg.Set_int level, "set the notation level" ] in
   let usage = "test_parser -level { 1 | 2 | 3 }" in
   Arg.parse arg_spec (fun _ -> raise (Arg.Bad usage)) usage;
-  let parse_fun =
+  let parse_fun =
     match !level with
-    | 1 -> CicNotationParser.parse_syntax_pattern
-    | 2 -> CicNotationParser.parse_ast_pattern
-    | 3 -> CicNotationParser.parse_interpretation
+    | 1 -> ignore (CicNotationParser.parse_syntax_pattern s)
+    | 2 -> ignore (CicNotationParser.parse_ast_pattern s)
+    | 3 -> ignore (CicNotationParser.parse_interpretation s)
     | _ -> Arg.usage arg_spec usage; exit 1
   in
   let ic = stdin in
@@ -49,7 +49,7 @@ let _ =
       let line = input_line ic in
       let istream = Stream.of_string line in
       try
-        let _ = parse_fun istream in
+        parse_fun istream;
         print_endline "ok"
       with CicNotationParser.Parse_error (floc, msg) ->
         let (x, y) = loc_of_floc floc in