1 (******************************************************************************)
2 (* SXSI : XPath evaluator *)
3 (* Kim Nguyen (Kim.Nguyen@nicta.com.au) *)
4 (* Copyright NICTA 2008 *)
5 (* Distributed under the terms of the LGPL (see LICENCE) *)
6 (******************************************************************************)
9 type path = Absolute of step list | AbsoluteDoS of step list| Relative of step list
10 and step = axis * test * predicate
11 and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling
12 | Parent | Ancestor | AncestorOrSelf |PrecedingSibling | Preceding | Following
14 and predicate = Or of predicate*predicate
15 | And of predicate*predicate
18 and expression = Path of path
19 | Function of string*expression list
24 val print : Format.formatter -> path -> unit
25 val print_step : Format.formatter -> step -> unit
26 val print_axis : Format.formatter -> axis -> unit
27 val print_test : Format.formatter -> test -> unit
28 val print_predicate : Format.formatter -> predicate -> unit
29 val print_expression : Format.formatter -> expression -> unit
33 val parse_string : string -> Ast.path
34 val parse : string -> Ast.path
38 val compile : Ast.path -> 'a Ata.t * (Tag.t*Ptset.t) list * string option