-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]"; ]
+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
+ in
+ if (!pos > 3 || !pos < 2)
+ then begin Arg.usage spec usage_msg; exit 1 end