X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fxpath_internal_parser.mly;h=6395b6e38b1e366473b13d9d04f1ef33d8e94e33;hp=2a861aa7f2ee19313270081344c031a7b711a277;hb=fe2ba1820282783ae8c10fbbbd2b65d3dc4c67f2;hpb=b00bff88c7902e828804c06b7f9dc55222fdc84e diff --git a/src/xpath/xpath_internal_parser.mly b/src/xpath/xpath_internal_parser.mly index 2a861aa..6395b6e 100644 --- a/src/xpath/xpath_internal_parser.mly +++ b/src/xpath/xpath_internal_parser.mly @@ -14,10 +14,6 @@ (* *) (***********************************************************************) -(* - Time-stamp: -*) - open Ast open Tree %} @@ -103,12 +99,7 @@ step: 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 @@ -134,14 +125,13 @@ axis_test: 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),