From b11baedbb4708305eb9a290dc5846e7c62e310f4 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Fri, 7 Nov 2003 11:54:53 +0000 Subject: [PATCH] porting mqgtop to version 1.4 --- helm/mathql_test/Makefile | 6 ++---- helm/mathql_test/mqgtop.ml | 11 ++++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/helm/mathql_test/Makefile b/helm/mathql_test/Makefile index 8dd07889e..04fea5185 100644 --- a/helm/mathql_test/Makefile +++ b/helm/mathql_test/Makefile @@ -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=) diff --git a/helm/mathql_test/mqgtop.ml b/helm/mathql_test/mqgtop.ml index edf714b1e..ae06bc752 100644 --- a/helm/mathql_test/mqgtop.ml +++ b/helm/mathql_test/mqgtop.ml @@ -38,6 +38,7 @@ let int_options = ref "" let nl = "

\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 -- 2.39.2