X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fxpath%2Fulexer.ml;h=7a7d2a749cfc107e150af3c6be607a483a04fb35;hb=9522266372edb18327f96b21213b4efc3798ee98;hp=3e71c5a7b6b8cd4e38b2c5d17409723967f99c6a;hpb=238dc42c2cb6324b103585556c3f5f9150ee221e;p=tatoo.git diff --git a/src/xpath/ulexer.ml b/src/xpath/ulexer.ml index 3e71c5a..7a7d2a7 100644 --- a/src/xpath/ulexer.ml +++ b/src/xpath/ulexer.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) open Xpath_internal_parser @@ -121,10 +121,17 @@ let rec token = lexer | ">=" -> GTE | "=" -> EQ | "!=" -> NEQ + | ".." -> DOTDOT + | "." -> DOT | "node()" -> NODE | "text()" -> TEXT + | "comment()" -> COMMENT | '@' ncname -> ATTNAME (L.utf8_lexeme lexbuf) - + | "processing-instruction()" -> PI "" + | "processing-instruction('"ncname"')" + | "processing-instruction(\""ncname"\")"-> + let s = L.utf8_lexeme lexbuf in + PI (String.sub s 24 (String.length s - 26)) | ncname -> keyword_or_tag (L.utf8_lexeme lexbuf) | float -> let s = L.utf8_lexeme lexbuf in