projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ajout d'un compteur pour compter le nombre de noeuds évalués
[tatoo.git]
/
src
/
table_driver.ml
diff --git
a/src/table_driver.ml
b/src/table_driver.ml
index
9d5b240
..
d75c5df
100644
(file)
--- a/
src/table_driver.ml
+++ b/
src/table_driver.ml
@@
-26,16
+26,17
@@
let main () =
let query_tree_list =
List.map (fun query -> compile_xpath query) queries
in
let query_tree_list =
List.map (fun query -> compile_xpath query) queries
in
- let cpt = ref 0 in
-
- List.iter ( fun q ->
-
+ List.iter ( fun q ->
let res = eval_query_tree doc [ (Naive_tree.root doc) ] q in
let res = eval_query_tree doc [ (Naive_tree.root doc) ] q in
+ print_string "<xml_result num=\"1\" >\n";
print_node_list doc res;
print_node_list doc res;
- Format.printf "---------------Fin %i\n!" !cpt;
- incr cpt;
+ print_string "</xml_result>\n"
) query_tree_list ;
) query_tree_list ;
-
+
+ let _ = if !Table_options.count then
+ Format.fprintf Format.std_formatter "there are %i nodes\n" !Query_tree.compteur;
+ in
+
(* let output =
match !Options.output_file with
| None | Some "-" | Some "/dev/stdout" -> stdout
(* let output =
match !Options.output_file with
| None | Some "-" | Some "/dev/stdout" -> stdout