X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Foptions.ml;fp=src%2Foptions.ml;h=10c763397e98b45ab1723236e712233f7f1f3491;hb=ddd48898c9d77270a46fa16b66bb8b291e0859d0;hp=07f8ffb69547e9d31f7eb0d3ee8d481632688974;hpb=813b239795aac1844eb233dab7f8f98d8dba845e;p=SXSI%2Fxpathcomp.git diff --git a/src/options.ml b/src/options.ml index 07f8ffb..10c7633 100644 --- a/src/options.ml +++ b/src/options.ml @@ -14,6 +14,10 @@ let no_jump = ref false let verbose = ref false let text_index_type = ref 0 +(* Only valid if compiled with -DTRACE *) +let trace_file = ref "trace.dot" + + let set_index_type = function | "default" -> text_index_type := 0 | "swcsa" -> text_index_type := 1 @@ -55,8 +59,15 @@ let spec = Arg.align set_index_type), " choose text index type"; - "-v", Arg.Set(verbose), " verbose mode"; - ] + "-v", Arg.Set(verbose), " verbose mode"; ] @ +IFDEF TRACE +THEN [ + "-trace-file", Arg.Set_string(trace_file), + " save the full trace in dot format in " + ] +ELSE [] +END + let parse_cmdline() = let _ = Arg.parse spec anon_fun usage_msg