]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_test/mqtop.ml
- New interface for the MathQL interpreter (1.3 version)
[helm.git] / helm / ocaml / mathql_test / mqtop.ml
diff --git a/helm/ocaml/mathql_test/mqtop.ml b/helm/ocaml/mathql_test/mqtop.ml
new file mode 100644 (file)
index 0000000..d601d65
--- /dev/null
@@ -0,0 +1,13 @@
+let _ =
+   let module U = MQueryUtil in
+   let module X = MQueryMisc in
+   let t = X.start_time () in
+   let ich = Lexing.from_channel stdin in
+   let rec aux () =
+      let t = X.start_time () in
+      U.text_of_query print_string (U.query_of_text ich) "\n";
+      Printf.printf "mqtop: query: %s\n" (X.stop_time t);
+      flush stdout; aux()
+   in
+   begin try aux() with End_of_file -> () end;
+   Printf.printf "mqtop: done: %s\n" (X.stop_time t)