2417eded9816cfaed315b888435ee52196316199
[SXSI/xpathcomp.git] / src / nodeSet.mli
1
2 module type S =
3   sig
4     type t
5     type elt = Tree.node
6     val empty : t
7     val var : (int*State.t) -> t
8     val close : ((int*State.t), t) Hashtbl.t -> t -> t
9     val is_open : t -> bool
10     val singleton : elt -> t
11     val cons : elt -> t -> t
12     val snoc : t -> elt -> t
13     val concat : t -> t -> t
14     val concat3 : t -> t -> t -> t
15     val concat4 : t -> t -> t -> t -> t
16     val conscat : elt -> t -> t -> t
17     val conscat3 : elt -> t -> t -> t -> t
18     val conscat4 : elt -> t -> t -> t -> t -> t
19     val subtree_tags : Tree.t -> elt -> Tag.t -> t
20     val subtree_elements : Tree.t -> elt -> t
21     val iter : ( elt -> unit) -> t -> unit
22     val fold : ( elt -> 'a -> 'a) -> t -> 'a -> 'a
23     val length : t -> int
24     val serialize : string -> Tree.t -> t -> unit
25
26
27
28   end
29
30 module Count : S with type t = int
31
32 type  clist =
33   | Nil
34   | Cons of Tree.node * clist
35   | Concat of clist *  clist
36   | ConsCat of Tree.node * clist * clist
37   | SubtreeTags of Tree.t * Tree.node * Tag.t
38   | SubtreeElts of Tree.t * Tree.node
39
40
41 type 'a mat = { mutable clist : clist;
42                 mutable length : int }
43
44 module Mat : S with type t = Tree.node mat
45
46 val debug : Tree.node mat -> unit
47
48 module Partial(N : S) : S