Make the tree/text interface more flexible to various text index.
[SXSI/xpathcomp.git] / src / l2JIT.mli
1 type jump =
2   | FIRST_CHILD of StateSet.t
3   | NEXT_SIBLING of StateSet.t
4   | FIRST_ELEMENT of StateSet.t
5   | NEXT_ELEMENT of StateSet.t
6   | TAGGED_DESCENDANT of StateSet.t * Tag.t
7   | TAGGED_FOLLOWING of StateSet.t * Tag.t
8   | SELECT_DESCENDANT of StateSet.t * Ptset.Int.t * Tree.unordered_set
9   | SELECT_FOLLOWING of StateSet.t * Ptset.Int.t * Tree.unordered_set
10   | TAGGED_CHILD of StateSet.t * Tag.t
11   | TAGGED_FOLLOWING_SIBLING of StateSet.t * Tag.t
12   | SELECT_CHILD of StateSet.t * Ptset.Int.t * Tree.unordered_set
13   | SELECT_FOLLOWING_SIBLING of StateSet.t * Ptset.Int.t * Tree.unordered_set
14   | TAGGED_SUBTREE of StateSet.t * Tag.t
15   | ELEMENT_SUBTREE of StateSet.t
16
17 val jump_stat_init : unit -> unit
18 val jump_stat : jump -> unit
19
20 val print_jump : Format.formatter -> jump -> unit
21
22 val jump_stat_summary : Format.formatter -> unit
23
24 type opcode =
25     CACHE
26   | RETURN
27   | LEFT of Translist.t * jump
28   | RIGHT of Translist.t * jump
29   | BOTH of Translist.t * jump * jump
30
31 type t = opcode Cache.Lvl2.t
32
33 val dummy : opcode
34
35 val create : unit -> t
36
37 (*val stats : Format.formatter -> t -> unit *)
38
39 val find : t -> int -> StateSet.Node.t -> opcode
40
41 val add : t -> int -> StateSet.Node.t -> opcode -> unit
42
43 val compile : t -> Ata.t -> Tree.t -> TagSet.elt -> StateSet.t -> opcode
44
45 val get_transitions : opcode -> Translist.t