./test.native ./tests/docs/tiny.xml '/child::site/child::regions'
-echo "\n"
+echo "________________________________________________________________________________"
./test.native ./tests/docs/tiny.xml -f ./tests/queries/Treebank.xml.queries
-echo "\n"
+echo "________________________________________________________________________________"
./test.native ./tests/docs/tiny.xml '/descendant::listitem[not(descendant::keyword/child::emph)]/descendant::parlist'
-echo "/n"
+echo "________________________________________________________________________________"
./test.native ./tests/docs/tiny.xml -f ./tests/queries/my.queries
\ No newline at end of file
let print fmt asta =
let print_box fmt flag =
let pp = Format.fprintf fmt in
- Format.fprintf fmt "@[<v 0># Query states: %a@ @]"
+ pp "@[<v 0># Query states: %a@ @]"
StateSet.print asta.quer;
- Format.fprintf fmt "@[<v 0># Recognizing states: %a@ @]"
+ pp "@[<v 0># Recognizing states: %a@ @]"
StateSet.print asta.reco;
- Format.fprintf fmt "@[<v 0># Selecting states: %a@ @]"
+ pp "@[<v 0># Selecting states: %a@ @]"
StateSet.print asta.selec;
- Format.fprintf fmt "@[<v 0># Bottom states: %a@ @]"
+ pp "@[<v 0># Bottom states: %a@ @]"
StateSet.print asta.bottom;
- Format.fprintf fmt "@[<v 0># Tom states: %a@ @]"
+ pp "@[<v 0># Tom states: %a@ @]"
StateSet.print asta.top;
let print_list_tr fmt z=
- SetT.iter (fun x -> Format.fprintf fmt "| %a@ " Transition.print x) z in
+ if SetT.is_empty z
+ then Format.fprintf fmt "ΓΈ"
+ else
+ SetT.iter (fun x -> Format.fprintf fmt "| %a@ " Transition.print x) z in
let print_box_list fmt trans =
Format.fprintf fmt " @[<hov 0>%a @]" print_list_tr trans in
Format.fprintf fmt "@[<v 0># Queries transitions:@ %a@ @]"
print_box_list asta.trans_q;
Format.fprintf fmt "@[<v 0># Recognizing transitions:@ %a@ @]"
print_box_list asta.trans_r in
- Format.fprintf fmt "@[<v 0> ##### ASTA #####@. %a@ @]@ " print_box 0
+ Format.fprintf fmt "@[<v 0> ##### ASTA #####@. %a@ @]" print_box 0
let to_file out asta = ()
fprintf err_formatter "@[<v 0> ##### Query #####@. %a@]@ "
XPath.Ast.print query;
Asta.print err_formatter asta;
- fprintf err_formatter "@[<v 0> ##### Doc #####@.%a@]@ "
- Tree.print_xml doc (Tree.root doc);
+ output_string stderr "\n##### Doc #####\n";
+ Tree.print_xml stderr doc (Tree.root doc);
+ output_string stderr "\n";
exit 0