projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow the @id syntax in XPath expressions.
[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
fe38f67
..
3651d2c
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-03-
09 19:24:2
8 CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-03-
10 14:31:4
8 CET by Kim Nguyen>
*)
open Ast
*)
open Ast
@@
-23,6
+23,7
@@
%}
%token <string> TAG
%}
%token <string> TAG
+%token <string> ATTNAME
%token <string> STRING
%token <int> INT
%token <float> FLOAT
%token <string> STRING
%token <int> INT
%token <float> FLOAT
@@
-85,7
+86,7
@@
step:
axis_test:
AXIS COLONCOLON test { let a, t = $1, $3 in
axis_test:
AXIS COLONCOLON test { let a, t = $1, $3 in
- if a == Attribute && Utils.QNameSet.is_finite t then
+ if a == Attribute && Utils.QNameSet.is_finite t then
(a, Utils.QNameSet.fold
(fun t a ->
Utils.QNameSet.add
(a, Utils.QNameSet.fold
(fun t a ->
Utils.QNameSet.add
@@
-101,6
+102,8
@@
axis_test:
let a = Format.flush_str_formatter () in
Child, Utils.QNameSet.singleton (Utils.QName.of_string a)
}
let a = Format.flush_str_formatter () in
Child, Utils.QNameSet.singleton (Utils.QName.of_string a)
}
+| ATTNAME { (Attribute,
+ Utils.QNameSet.singleton (Utils.QName.of_string $1)) }
;
test:
;
test:
@@
-151,4
+154,3
@@
arg_list1:
expr { [ $1 ] }
| arg_list1 COMMA expr { $3 :: $1 }
;
expr { [ $1 ] }
| arg_list1 COMMA expr { $3 :: $1 }
;
-