X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fulexer.ml;h=dbde49035c9d6ce60e86a39760696b5e5533c856;hp=3e71c5a7b6b8cd4e38b2c5d17409723967f99c6a;hb=53a0fd29a20e7f4550e0eb5fa5b0d5af6191c36d;hpb=7c1d3641c4c5d7bde075df20863ab4242df3b763 diff --git a/src/xpath/ulexer.ml b/src/xpath/ulexer.ml index 3e71c5a..dbde490 100644 --- a/src/xpath/ulexer.ml +++ b/src/xpath/ulexer.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) open Xpath_internal_parser @@ -123,8 +123,13 @@ let rec token = lexer | "!=" -> NEQ | "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