Simplify the automaton encoding a bit (remove redundant predicates in formulae).
[tatoo.git] / src / xpath / ast.mli
index 7cc91e4..f2b2a1d 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
-(*
-  Time-stamp: <Last modified on 2013-03-04 16:24:33 CET by Kim Nguyen>
-*)
-
 type path = single_path list
+    (* the step are given in reverse with the last step of the query
+       being the first of the step list *)
 and single_path = Absolute of step list | Relative of step list
 and step = axis * test * expr list
 and axis = Self | Attribute | Child
@@ -28,21 +26,21 @@ and axis = Self | Attribute | Child
            | PrecedingSibling
            | Preceding | Following
 
-and test = Utils.QNameSet.t
+and test = QNameSet.t * Tree.NodeKind.t
 
 and binop = Eq | Neq | Lt | Gt | Lte | Gte | Or | And | Add | Sub | Mult | Div | Mod
 and unop =  Neg
 and expr =
   | Number of [ `Int of int | `Float of float ]
   | String of string
-  | Fun_call of Utils.QName.t * expr list
+  | Fun_call of QName.t * expr list
   | Path of path
   | Binop of expr * binop * expr
   | Unop of unop * expr
 type t = path
-val text : Utils.QNameSet.t
-val node : Utils.QNameSet.t
-val star : Utils.QNameSet.t
+val text : QNameSet.t
+val node : QNameSet.t
+val star : QNameSet.t
 val print_binop : Format.formatter -> binop -> unit
 val print_unop : Format.formatter -> unop -> unit
 val print_path : Format.formatter -> path -> unit