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
/
ulexer.ml
diff --git
a/src/xpath/ulexer.ml
b/src/xpath/ulexer.ml
index
2153e18
..
3e71c5a
100644
(file)
--- a/
src/xpath/ulexer.ml
+++ b/
src/xpath/ulexer.ml
@@
-14,7
+14,7
@@
(***********************************************************************)
(*
(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-0
2-14 15:38:56
CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-0
3-10 14:34:41
CET by Kim Nguyen>
*)
open Xpath_internal_parser
*)
open Xpath_internal_parser
@@
-54,7
+54,7
@@
let return lexbuf tok = (tok, L.loc lexbuf)
let return_loc i j tok = (tok, (i,j))
let regexp ncname_char =
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')
let hexa_digit = function
| '0'..'9' as c -> (Char.code c) - (Char.code '0')
@@
-123,6
+123,8
@@
let rec token = lexer
| "!=" -> NEQ
| "node()" -> NODE
| "text()" -> TEXT
| "!=" -> 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
| ncname -> keyword_or_tag (L.utf8_lexeme lexbuf)
| float ->
let s = L.utf8_lexeme lexbuf in
@@
-165,5
+167,3
@@
and string start double = lexer
| _ ->
store_lexeme lexbuf;
string start double lexbuf
| _ ->
store_lexeme lexbuf;
string start double lexbuf
-
-