Add a kind element to the node tree. Improve support for XPath by
[tatoo.git] / src / xpath / ulexer.ml
index 3e71c5a..dbde490 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-10 14:34:41 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-13 10:34:14 CET by Kim Nguyen>
 *)
 
 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