Removed testing cruft
[SXSI/xpathcomp.git] / options.ml
index ff4fdbe..bd7fcce 100644 (file)
@@ -6,6 +6,8 @@ let query = ref ""
 let input_file = ref ""
 let output_file = ref None
 let save_file = ref ""
+let count_only = ref false
+
 
 let usage_msg = Printf.sprintf "%s <input.{xml|srx}> 'query' [output]" Sys.argv.(0)
 
@@ -18,11 +20,12 @@ let anon_fun =
     | 2 -> output_file := Some s; incr pos
     | _ -> raise (Arg.Bad(s))
 
-let spec = [ "-f", Arg.Set_int(sample_factor),"sample factor [default=64]";
-            "-i", Arg.Set(index_empty_texts),"index empty texts [default=false]";
-            "-d", Arg.Set(disable_text_collection),"Disable text collection[default=false]"; 
-            "-s", Arg.Set_string(save_file),"Save the intermediate representation into file.srx"; 
-          ] 
+let spec = [ "-c", Arg.Set(count_only), "counting only (don't materialize the result set";
+             "-f", Arg.Set_int(sample_factor), "sample factor [default=64]";
+            "-i", Arg.Set(index_empty_texts), "index empty texts [default=false]";
+            "-d", Arg.Set(disable_text_collection), "disable text collection[default=false]"; 
+            "-s", Arg.Set_string(save_file), "save the intermediate representation into file.srx"; 
+          ]
 
 let parse_cmdline() = 
   let _ = Arg.parse spec anon_fun usage_msg