{
CAMLparam2(vtree, vtag);
CAMLlocal1(vindex);
+ const char * s;
vindex = sxsi_alloc_custom<lex_index*>();
xml_tree * tree = XMLTREE(vtree);
xml_tree::tag_t tag = TAG(vtag);
-
//Uncomment the following and comment the failwith line
//LEXINDEX(vindex) = ... return a lex_index* ....
type index
-external build_lex_index : Tree.t -> Tag.t -> index = "caml_build_lex_index"
+external build_lex_index : Tree.tree_pointer -> Tag.t -> index = "caml_build_lex_index"
+
external print_lex_index : index -> unit = "caml_print_lex_index"
else
let () = Printf.eprintf "Error: unrecognized extension" in exit 2
in
- Printf.printf "Building lex index\n%!";
- let index = build_lex_index document (Tag.tag Sys.argv.(2)) in
+ Tag.init (Tree.tag_operations document);
+ Printf.printf "Building lex index for tag %s\n%!" (Tag.to_string (Tag.tag Sys.argv.(2)));
+ let index = build_lex_index (Tree.get_tree_pointer document) (Tag.tag Sys.argv.(2)) in
Printf.printf "Printing lex index\n%!";
print_lex_index index;
exit 0
val bit_vector_unsafe_get : bit_vector -> int -> bool
val reinit : unit -> unit
+
+type tree_pointer
+val get_tree_pointer : t -> tree_pointer