projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Purge libxml++ from build.
[SXSI/xpathcomp.git]
/
src
/
options.ml
diff --git
a/src/options.ml
b/src/options.ml
index
07f8ffb
..
10c7633
100644
(file)
--- 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
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
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";
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),
+ "<trace_file> save the full trace in dot format in <trace_file>"
+ ]
+ELSE []
+END
+
let parse_cmdline() =
let _ = Arg.parse spec anon_fun usage_msg
let parse_cmdline() =
let _ = Arg.parse spec anon_fun usage_msg