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)
MQITOP = mqitop.ml
MQGTOP = mqgtop.ml
-DEPOBJS = $(MQTOP) $(MQITOP)
-# $(MQGTOP)
+DEPOBJS = $(MQTOP) $(MQITOP) $(MQGTOP)
AUXOBJS = mQGTopParser.ml mQGTopParser.mli mQGTopLexer.ml
all: $(DEPOBJS:.ml=)
let nl = " <p>\n"
+module IO = MQueryIO
module U = MQueryUtil
module I = MQueryInterpreter
module C = MQIConn
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
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