Merge branch 'handle-stdout'
[SXSI/xpathcomp.git] / src / xPath.mli
1 module Ast :
2 sig
3   type path = Absolute of step list | AbsoluteDoS of step list| Relative of step list
4   and step = axis * test * predicate
5   and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling
6              | Parent | Ancestor | AncestorOrSelf |PrecedingSibling | Preceding | Following
7   and test =  Simple of TagSet.t
8              | Complex of TagSet.t * Tree.Predicate.t
9   and predicate = Or of predicate*predicate
10                   | And of predicate*predicate
11                     | Not of predicate
12                     | Expr of expression
13   and expression =  Path of path
14                     | Function of string*expression list
15                     | Int of int
16                     | String of string
17                     | True | False
18   type t = path
19   val print : Format.formatter -> path -> unit
20   val print_step : Format.formatter -> step -> unit
21   val print_axis : Format.formatter -> axis -> unit
22   val print_test : Format.formatter -> test -> unit
23   val print_predicate : Format.formatter -> predicate -> unit
24   val print_expression : Format.formatter -> expression -> unit
25 end
26
27
28 val parse : string -> Ast.path