Refactor module organisation and build process.
[tatoo.git] / src / xpath / ast.mli
diff --git a/src/xpath/ast.mli b/src/xpath/ast.mli
new file mode 100644 (file)
index 0000000..f2a4df7
--- /dev/null
@@ -0,0 +1,49 @@
+(***********************************************************************)
+(*                                                                     *)
+(*                               TAToo                                 *)
+(*                                                                     *)
+(*                     Kim Nguyen, LRI UMR8623                         *)
+(*                   Université Paris-Sud & CNRS                       *)
+(*                                                                     *)
+(*  Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(*  Recherche Scientifique. All rights reserved.  This file is         *)
+(*  distributed under the terms of the GNU Lesser General Public       *)
+(*  License, with the special exception on linking described in file   *)
+(*  ../LICENSE.                                                        *)
+(*                                                                     *)
+(***********************************************************************)
+
+(*
+  Time-stamp: <Last modified on 2013-02-07 09:35:40 CET by Kim Nguyen>
+*)
+
+type path = single_path list
+and single_path = Absolute of step list | Relative of step list
+and step = axis * test * expr list
+and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling
+           | Parent | Ancestor | AncestorOrSelf | PrecedingSibling | Preceding | Following
+
+and test = Utils.QNameSet.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
+  | 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 print_binop : Format.formatter -> binop -> unit
+val print_unop : Format.formatter -> unop -> unit
+val print_path : Format.formatter -> path -> unit
+val print_single_path : Format.formatter -> single_path -> unit
+val print_step : Format.formatter -> step -> unit
+val print_axis : Format.formatter -> axis -> unit
+val print_test : Format.formatter -> test -> unit
+val print_expr : Format.formatter -> expr -> unit
+