Simplify the automaton encoding a bit (remove redundant predicates in formulae).
[tatoo.git] / src / xpath / ulexer.ml
index 7a7d2a7..02b6e02 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
-(*
-  Time-stamp: <Last modified on 2013-03-13 14:14:15 CET by Kim Nguyen>
-*)
-
 open Xpath_internal_parser
 
 module L = Ulexing
@@ -126,7 +122,8 @@ let rec token = lexer
  | "node()" -> NODE
  | "text()" -> TEXT
  | "comment()" -> COMMENT
- | '@' ncname -> ATTNAME (L.utf8_lexeme lexbuf)
+ | '@' ncname -> let l = L.utf8_lexeme lexbuf in
+                 ATTNAME (String.sub l 1 (String.length l - 1))
  | "processing-instruction()" -> PI ""
  | "processing-instruction('"ncname"')"
  | "processing-instruction(\""ncname"\")"->