]> matita.cs.unibo.it Git - helm.git/commitdiff
porting mqgtop to version 1.4
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Fri, 7 Nov 2003 11:54:53 +0000 (11:54 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Fri, 7 Nov 2003 11:54:53 +0000 (11:54 +0000)
helm/mathql_test/Makefile
helm/mathql_test/mqgtop.ml

index 8dd07889eb872ef6d54b639e33b2dd7af81b234b..04fea5185fd64a9b1b0c3d6989b309fbc19b402f 100644 (file)
@@ -1,7 +1,6 @@
 BIN_DIR = /usr/local/bin
 REQUIRES = unix helm-cic_textual_parser \
-          helm-mathql helm-mathql_interpreter 
-#helm-mathql_generator
+          helm-mathql helm-mathql_interpreter helm-mathql_generator
 PREDICATES =
 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)"
 OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS)
@@ -17,8 +16,7 @@ MQTOP = mqtop.ml
 MQITOP = mqitop.ml
 MQGTOP = mqgtop.ml
 
-DEPOBJS = $(MQTOP) $(MQITOP) 
-# $(MQGTOP)
+DEPOBJS = $(MQTOP) $(MQITOP) $(MQGTOP)
 AUXOBJS = mQGTopParser.ml mQGTopParser.mli mQGTopLexer.ml 
 
 all: $(DEPOBJS:.ml=)
index edf714b1e6a1ecb0e6f2216079182d68d84a6617..ae06bc752b317f4f865d473e2afddba9400dc7b0 100644 (file)
@@ -38,6 +38,7 @@ let int_options = ref ""
 
 let nl = " <p>\n"
 
+module IO = MQueryIO
 module U  = MQueryUtil
 module I  = MQueryInterpreter
 module C  = MQIConn
@@ -73,14 +74,14 @@ let issue handle q =
       let out = output_string och in 
       if ! query_num = 1 then out (time () ^ nl);
       out ("Query: " ^ string_of_int ! query_num ^ nl);
-      U.text_of_query out q nl;
+      IO.text_of_query out nl q;
       out ("Result: " ^ nl);
-      U.text_of_result out r nl;
+      IO.text_of_result out nl r;
       close_out och
    in
-   if ! show_queries then U.text_of_query (output_string stdout) q nl;
+   if ! show_queries then IO.text_of_query (output_string stdout) nl q;
    let r = I.execute handle q in    
-   U.text_of_result (output_string stdout) r nl;
+   IO.text_of_result (output_string stdout) nl r;
    if ! log_file <> "" then log q r; 
    incr query_num;
    flush stdout
@@ -139,7 +140,7 @@ let execute ich =
    let handle = get_handle () in
    let rec execute_aux () =
       try 
-         let q = U.query_of_text lexbuf in
+         let q = IO.query_of_text lexbuf in
          issue handle q; execute_aux ()
       with End_of_file -> ()
    in