X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=xPath.mli;h=23235d7c814c513146b98ef079234fd0cf35d6e2;hb=cea756c7adc49891004bfe455628010eb7a28bc9;hp=d4e523b081ceeab4c7ab619274a6649d447b1c59;hpb=3623eefccfb5fc69e19ad975a3669f51a2a8b276;p=SXSI%2Fxpathcomp.git diff --git a/xPath.mli b/xPath.mli index d4e523b..23235d7 100644 --- a/xPath.mli +++ b/xPath.mli @@ -5,35 +5,35 @@ (* Distributed under the terms of the LGPL (see LICENCE) *) (******************************************************************************) module Ast : - sig - type path = Absolute of step list | AbsoluteDoS of step list| Relative of step list - and step = axis * test * predicate - and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling - | Parent - and test = TagSet.Xml.t - and predicate = Or of predicate*predicate - | And of predicate*predicate +sig + type path = Absolute of step list | AbsoluteDoS of step list| Relative of step list + and step = axis * test * predicate + and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling + | Parent | Ancestor | AncestorOrSelf |PrecedingSibling | Preceding | Following + and test = TagSet.t + and predicate = Or of predicate*predicate + | And of predicate*predicate | Not of predicate | Expr of expression - and expression = Path of path - | Function of string*expression list - | Int of int - | String of string - | True | False - type t = path - val print : Format.formatter -> 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_predicate : Format.formatter -> predicate -> unit - val print_expression : Format.formatter -> expression -> unit - end + and expression = Path of path + | Function of string*expression list + | Int of int + | String of string + | True | False + type t = path + val print : Format.formatter -> 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_predicate : Format.formatter -> predicate -> unit + val print_expression : Format.formatter -> expression -> unit +end module Parser : - sig - val parse_string : string -> Ast.path - val parse : string -> Ast.path - end -module Compile : sig - val compile : Ast.path -> Automaton.t + val parse_string : string -> Ast.path + val parse : string -> Ast.path +end +module Compile : +sig +val compile : Ast.path -> Ata.t * (Tag.t*Ptset.t) list * string option end