(* *)
(***********************************************************************)
-(*
- Time-stamp: <Last modified on 2013-04-04 18:44:13 CEST by Kim Nguyen>
-*)
-
open Ast
open Tree
%}
axis_test:
AXIS COLONCOLON test { let a, (t,k) = $1, $3 in
match a with
- Attribute when QNameSet.is_finite t ->
- [ a, ((QNameSet.fold
- (fun t a ->
- QNameSet.add
- (QName.attribute t) a)
- t QNameSet.empty), k) ]
+ | Attribute -> [ a, (t, NodeKind.Attribute) ]
| Preceding|Following ->
[ (Descendant true, (t,k));
if a == Preceding then
test:
NODE { node, NodeKind.Node }
| TEXT { text, NodeKind.Text }
-| STAR { star, NodeKind.Element }
+| STAR { node, NodeKind.Element }
| COMMENT { QNameSet.singleton(QName.comment),
NodeKind.Comment
}
| PI { (if $1 = "" then star
else QNameSet.singleton(
- QName.processing_instruction (
- QName.of_string $1)
+ QName.of_string $1
)), NodeKind.ProcessingInstruction
}
| TAG { QNameSet.singleton(QName.of_string $1),