projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow to pass an explicit destructor when registering a custom tag
[SXSI/xpathcomp.git]
/
src
/
formula.ml
diff --git
a/src/formula.ml
b/src/formula.ml
index
16db6d5
..
3b344e7
100644
(file)
--- a/
src/formula.ml
+++ b/
src/formula.ml
@@
-6,7
+6,7
@@
type 'hcons expr =
| False | True
| Or of 'hcons * 'hcons
| And of 'hcons * 'hcons
| False | True
| Or of 'hcons * 'hcons
| And of 'hcons * 'hcons
- | Atom of ([ `Left | `Right ] * bool * State.t)
+ | Atom of ([ `Left | `Right
| `Epsilon
] * bool * State.t)
| Pred of Tree.Predicate.t
type 'hcons node = {
| Pred of Tree.Predicate.t
type 'hcons node = {
@@
-78,6
+78,7
@@
let rec print ?(parent=false) ppf f =
match dir with
| `Left -> Pretty.down_arrow, Pretty.subscript 1
| `Right -> Pretty.down_arrow, Pretty.subscript 2
match dir with
| `Left -> Pretty.down_arrow, Pretty.subscript 1
| `Right -> Pretty.down_arrow, Pretty.subscript 2
+ | `Epsilon -> Pretty.epsilon, ""
in
fprintf fmt "%s%s" a_str d_str;
State.print fmt s;
in
fprintf fmt "%s%s" a_str d_str;
State.print fmt s;
@@
-109,6
+110,7
@@
let atom_ d p s =
let ss = match d with
| `Left -> (si,StateSet.empty,si),empty_triple
| `Right -> empty_triple,(si,StateSet.empty,si)
let ss = match d with
| `Left -> (si,StateSet.empty,si),empty_triple
| `Right -> empty_triple,(si,StateSet.empty,si)
+ | `Epsilon -> empty_triple, empty_triple
in fst (cons (Atom(d,p,s)) (Atom(d,not p,s)) ss ss 1 1)
let pred_ p =
in fst (cons (Atom(d,p,s)) (Atom(d,not p,s)) ss ss 1 1)
let pred_ p =