projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/test-suite'
[tatoo.git]
/
src
/
xpath
/
xpath_internal_parser.mly
diff --git
a/src/xpath/xpath_internal_parser.mly
b/src/xpath/xpath_internal_parser.mly
index
04ecf36
..
fe38f67
100644
(file)
--- a/
src/xpath/xpath_internal_parser.mly
+++ b/
src/xpath/xpath_internal_parser.mly
@@
-15,7
+15,7
@@
(***********************************************************************)
(*
(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-0
2-07 10:31:01
CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-0
3-09 19:24:28
CET by Kim Nguyen>
*)
open Ast
*)
open Ast
@@
-68,14
+68,14
@@
simple_path:
absolute_path:
SLASH relative_path { $2 }
absolute_path:
SLASH relative_path { $2 }
-| SLASHSLASH relative_path {
(DescendantOrSelf, node, []) :: $2
}
+| SLASHSLASH relative_path {
$2 @ [(Descendant true, node, [])]
}
;
relative_path:
step { [ $1 ] }
| relative_path SLASH step { $3 :: $1 }
| relative_path SLASHSLASH step { $3
;
relative_path:
step { [ $1 ] }
| relative_path SLASH step { $3 :: $1 }
| relative_path SLASHSLASH step { $3
- :: (Descendant
OrSelf
, node, [])
+ :: (Descendant
true
, node, [])
:: $1 }
;
:: $1 }
;
@@
-84,7
+84,16
@@
step:
;
axis_test:
;
axis_test:
- AXIS COLONCOLON test { $1, $3 }
+ AXIS COLONCOLON test { let a, t = $1, $3 in
+ if a == Attribute && Utils.QNameSet.is_finite t then
+ (a, Utils.QNameSet.fold
+ (fun t a ->
+ Utils.QNameSet.add
+ (Utils.QName.add_attribute_prefix t) a)
+ t Utils.QNameSet.empty)
+ else
+ (a, t)
+ }
| test { Child, $1 }
| AXIS {
let _ = Format.flush_str_formatter () in
| test { Child, $1 }
| AXIS {
let _ = Format.flush_str_formatter () in