X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fast.mli;h=f2b2a1d03fc547c38eaef0cd60331e59fe477f74;hp=8040bb1eab586385498d3e80ddede91de9e9c9b7;hb=fe2ba1820282783ae8c10fbbbd2b65d3dc4c67f2;hpb=e13f5deae217f945b44fa345ef4f0008e1780787 diff --git a/src/xpath/ast.mli b/src/xpath/ast.mli index 8040bb1..f2b2a1d 100644 --- a/src/xpath/ast.mli +++ b/src/xpath/ast.mli @@ -13,11 +13,9 @@ (* *) (***********************************************************************) -(* - Time-stamp: -*) - 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 @@ -52,3 +50,4 @@ val print_axis : Format.formatter -> axis -> unit val print_test : Format.formatter -> test -> unit val print_expr : Format.formatter -> expr -> unit +val invert_axis : axis -> axis