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 | AbsoluteDoS of step list
22 | Relative of step list
24 and step = axis * test * predicate
25 and axis = Self | Attribute | Child | Descendant | DescendantOrSelf
27 | Parent | Ancestor | AncestorOrSelf |PrecedingSibling
28 | Preceding | Following
29 and test = Simple of QNameSet.t
30 and predicate = Or of predicate*predicate
31 | And of predicate*predicate
34 and expression = Path of path
35 | Function of string*expression list
40 val print : Format.formatter -> path -> unit
41 val print_step : Format.formatter -> step -> unit
42 val print_axis : Format.formatter -> axis -> unit
43 val print_test : Format.formatter -> test -> unit
44 val print_predicate : Format.formatter -> predicate -> unit
45 val print_expression : Format.formatter -> expression -> unit
49 val parse_string : string -> Ast.path
50 val parse_file : in_channel -> Ast.path