(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-02-14 15:38:56 CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-03-10 14:34:41 CET by Kim Nguyen>
*)
open Xpath_internal_parser
let return_loc i j tok = (tok, (i,j))
let regexp ncname_char =
- xml_letter | xml_digit | [ '-' '_' ] | xml_combining_char | xml_extender | "\\."
+ xml_letter | xml_digit | [ '-' '_' '.'] | xml_combining_char | xml_extender
let hexa_digit = function
| '0'..'9' as c -> (Char.code c) - (Char.code '0')
| "!=" -> NEQ
| "node()" -> NODE
| "text()" -> TEXT
+ | '@' ncname -> ATTNAME (L.utf8_lexeme lexbuf)
+
| ncname -> keyword_or_tag (L.utf8_lexeme lexbuf)
| float ->
let s = L.utf8_lexeme lexbuf in
| _ ->
store_lexeme lexbuf;
string start double lexbuf
-
-
(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-03-09 19:24:28 CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-03-10 14:31:48 CET by Kim Nguyen>
*)
open Ast
%}
%token <string> TAG
+%token <string> ATTNAME
%token <string> STRING
%token <int> INT
%token <float> FLOAT
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
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:
expr { [ $1 ] }
| arg_list1 COMMA expr { $3 :: $1 }
;
-