X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fcompile.ml;h=8ab26fbd2475a2dc4a5cf30c3e218b4c7caae6ba;hp=c52c720900a492d6cc462432b54ee6eb7c94ee62;hb=90ce5857f6cad2ebc753fdbc8e37882a1ff47415;hpb=9a127b83fbb1171ebd36e6f42780093412a5e91a diff --git a/src/xpath/compile.ml b/src/xpath/compile.ml index c52c720..8ab26fb 100644 --- a/src/xpath/compile.ml +++ b/src/xpath/compile.ml @@ -17,11 +17,11 @@ open Ast let ( => ) a b = (a, b) -let ( ++ ) a b = Ata.SFormula.or_ a b -let ( %% ) a b = Ata.SFormula.and_ a b +let ( ++ ) a b = Ata.Formula.or_ a b +let ( %% ) a b = Ata.Formula.and_ a b let ( @: ) a b = StateSet.add a b -module F = Ata.SFormula +module F = Ata.Formula let node_set = QNameSet.remove QName.document QNameSet.any @@ -121,7 +121,7 @@ let rec compile_expr e trans states = states2 | Fun_call (f, [ e0 ]) when (QName.to_string f) = "not" -> let phi, trans0, states0 = compile_expr e0 trans states in - (Ata.SFormula.not_ phi), + (F.not_ phi), trans0, states0 | Path p -> compile_path p trans states @@ -130,9 +130,9 @@ let rec compile_expr e trans states = and compile_path paths trans states = List.fold_left (fun (aphi, atrans, astates) p -> let phi, ntrans, nstates = compile_single_path p atrans astates in - (Ata.SFormula.or_ phi aphi), + (F.or_ phi aphi), ntrans, - nstates) (Ata.SFormula.false_,trans,states) paths + nstates) (F.false_,trans,states) paths and compile_single_path p trans states = let steps = @@ -147,7 +147,7 @@ and compile_single_path p trans states = and compile_step_list l trans states = match l with - | [] -> Ata.SFormula.true_, trans, states + | [] -> F.true_, trans, states | (axis, test, elist) :: ll -> let phi0, trans0, states0 = compile_step_list ll trans states in let phi1, trans1, states1 = @@ -182,7 +182,7 @@ let compile_top_level_step_list l trans states = is attribute *) let phi0 = if axis != Attribute then - phi0 %% (Ata.SFormula.not_ Ata.SFormula.is_attribute) + phi0 %% (F.not_ F.is_attribute) else phi0 in match ll with @@ -214,7 +214,7 @@ let compile_top_level_step_list l trans states = compile_axis_test Self (QNameSet.singleton QName.document, Tree.NodeKind.Node) - Ata.SFormula.true_ + F.true_ trans states in