1 (***********************************************************************)
5 (* Kim Nguyen, LRI UMR8623 *)
6 (* Université Paris-Sud & CNRS *)
8 (* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
9 (* Recherche Scientifique. All rights reserved. This file is *)
10 (* distributed under the terms of the GNU Lesser General Public *)
11 (* License, with the special exception on linking described in file *)
14 (***********************************************************************)
17 (** Abstract syntax tree of XPath queries *)
21 type path = Absolute of step list | Relative of step list
23 and step = axis * test * predicate
24 and axis = Self | Attribute | Child | Descendant | DescendantOrSelf
26 | Parent | Ancestor | AncestorOrSelf |PrecedingSibling
27 | Preceding | Following
28 and test = Simple of QNameSet.t
29 and predicate = Or of predicate*predicate
30 | And of predicate*predicate
33 and expression = Path of path
34 | Function of string*expression list
39 val print : Format.formatter -> path -> unit
40 val print_step : Format.formatter -> step -> unit
41 val print_axis : Format.formatter -> axis -> unit
42 val print_test : Format.formatter -> test -> unit
43 val print_predicate : Format.formatter -> predicate -> unit
44 val print_expression : Format.formatter -> expression -> unit
48 val parse_string : string -> Ast.path
49 val parse_file : in_channel -> Ast.path