X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fformula.ml;fp=src%2Fformula.ml;h=3b344e7b5cf90ec39d1331c488aa4516b2d78f85;hb=c0b6bf74a7df6f1c8951525cab015fda4c788a9d;hp=16db6d5ff61f0f56133f0ec4632f3f81e01edbb4;hpb=a84e4fba7daf4f600958487d88f0b733fb19042e;p=SXSI%2Fxpathcomp.git diff --git a/src/formula.ml b/src/formula.ml index 16db6d5..3b344e7 100644 --- 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 - | Atom of ([ `Left | `Right ] * bool * State.t) + | Atom of ([ `Left | `Right | `Epsilon ] * bool * State.t) | 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 + | `Epsilon -> Pretty.epsilon, "" 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) + | `Epsilon -> empty_triple, empty_triple in fst (cons (Atom(d,p,s)) (Atom(d,not p,s)) ss ss 1 1) let pred_ p =