1 (******************************************************************************)
2 (* SXSI : XPath evaluator *)
3 (* Kim Nguyen (Kim.Nguyen@nicta.com.au) *)
4 (* Copyright NICTA 2008 *)
5 (* Distributed under the terms of the LGPL (see LICENCE) *)
6 (******************************************************************************)
11 val compare : int -> int -> int
12 val equal : 'a -> 'a -> bool
14 val print : Format.formatter -> int -> unit
16 module SSet : Set.S with type elt = State.t
20 Label of State.t * TagSet.Xml.t * State.t * State.t
21 | External of State.t * (Tree.Binary.t -> bool) * State.t * State.t
22 val source : t -> State.t
23 val dest1 : t -> State.t
24 val dest2 : t -> State.t
28 module HT : Hashtbl.S with type key = State.t
30 label : (TagSet.Xml.t * State.t * State.t) HT.t;
31 extern : ((Tree.Binary.t -> bool) * State.t * State.t) HT.t;
33 val empty : unit -> hashtbl
34 val clear : hashtbl -> unit
35 val add : hashtbl -> t -> unit
38 ?pred_label:(State.t -> TagSet.Xml.t -> State.t -> State.t -> bool) ->
39 ?pred_extern:(State.t ->
40 (Tree.Binary.t -> bool) -> State.t -> State.t -> bool) ->
41 hashtbl -> State.t -> t list
42 val find_all_dest : State.t -> hashtbl -> t list
44 ('a -> HT.key -> TagSet.Xml.t -> State.t -> State.t -> 'a) ->
45 ('a -> HT.key -> (Tree.Binary.t -> bool) -> State.t -> State.t -> 'a) ->
46 hashtbl -> HT.key -> 'a -> 'a
48 module BST : Set.S with type elt = Tree.Binary.t
49 type t = { initial : SSet.t;
51 transitions : Transition.hashtbl;
54 mutable result : BST.t;
56 mutable max_states : int;
59 val dump : Format.formatter -> t -> unit
64 t -> Tree.Binary.t -> SSet.t -> SSet.t
65 val accept : t -> Tree.Binary.t -> bool
70 val accept : t -> Tree.Binary.t -> bool
71 val run : t -> Tree.Binary.t -> unit