(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-03-13 14:21:53 CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-04-04 18:44:13 CEST by Kim Nguyen>
*)
open Ast
- open Tree.Common
+ open Tree
%}
%token <string> TAG
axis_test:
AXIS COLONCOLON test { let a, (t,k) = $1, $3 in
match a with
- Attribute when Utils.QNameSet.is_finite t ->
- [ a, ((Utils.QNameSet.fold
+ Attribute when QNameSet.is_finite t ->
+ [ a, ((QNameSet.fold
(fun t a ->
- Utils.QNameSet.add
- (Utils.QName.attribute t) a)
- t Utils.QNameSet.empty), k) ]
+ QNameSet.add
+ (QName.attribute t) a)
+ t QNameSet.empty), k) ]
| Preceding|Following ->
[ (Descendant true, (t,k));
if a == Preceding then
let _ = Format.flush_str_formatter () in
let () = Format.fprintf Format.str_formatter "%a" Ast.print_axis $1 in
let a = Format.flush_str_formatter () in
- [Child, (Utils.QNameSet.singleton (Utils.QName.of_string a),NodeKind.Element)]
+ [Child, (QNameSet.singleton (QName.of_string a),NodeKind.Element)]
}
| ATTNAME { [(Attribute,
- (Utils.QNameSet.singleton (Utils.QName.of_string $1),
+ (QNameSet.singleton (QName.of_string $1),
NodeKind.Attribute))] }
;
NODE { node, NodeKind.Node }
| TEXT { text, NodeKind.Text }
| STAR { star, NodeKind.Element }
-| COMMENT { Utils.QNameSet.singleton(Utils.QName.comment),
+| COMMENT { QNameSet.singleton(QName.comment),
NodeKind.Comment
}
| PI { (if $1 = "" then star
- else Utils.QNameSet.singleton(
- Utils.QName.processing_instruction (
- Utils.QName.of_string $1)
+ else QNameSet.singleton(
+ QName.processing_instruction (
+ QName.of_string $1)
)), NodeKind.ProcessingInstruction
}
-| TAG { Utils.QNameSet.singleton(Utils.QName.of_string $1),
+| TAG { QNameSet.singleton(QName.of_string $1),
NodeKind.Element
}
;
| expr LTE expr { Binop($1, Lte, $3) }
| expr GT expr { Binop($1, Gt, $3) }
| expr GTE expr { Binop($1, Gte, $3) }
-| TAG LP arg_list RP { Fun_call(Utils.QName.of_string $1, $3) }
+| TAG LP arg_list RP { Fun_call(QName.of_string $1, $3) }
| LP expr RP { $2 }
| path { Path $1 }
;