X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=ulexer.ml;h=a6ea991b6d01251870fc4fecd4148c848aa0cada;hb=f0557f21878be17ddc75b1bc8f4f86da68c8e604;hp=ab41b34a583068241135f080a78064e370590f36;hpb=3623eefccfb5fc69e19ad975a3669f51a2a8b276;p=SXSI%2Fxpathcomp.git diff --git a/ulexer.ml b/ulexer.ml index ab41b34..a6ea991 100644 --- a/ulexer.ml +++ b/ulexer.ml @@ -188,15 +188,16 @@ let parse_char lexbuf base i = let rec token = lexer | [' ' '\t'] -> token lexbuf | "text()" | "node()" | "and" | "not" | "or" + | "contains" | "contains_full" | "self" | "descendant" | "child" | "descendant-or-self" - | "attribute" | "following-sibling" - | "parent" - | "(" |")" | "," | "::" | "/" | "//" | "[" | "]" | "*" | "." - -> return lexbuf (KWD (L.utf8_lexeme lexbuf)) + | "attribute" | "following-sibling" | "preceding-sibling" + | "parent" | "ancestor" | "ancestor-or-self" | "preceding" | "following" + | "(" |")" | "," | "::" | "/" | "//" | "[" | "]" | "*" | "." | ".." + -> return lexbuf (KWD (L.utf8_lexeme lexbuf)) | ncname -> return lexbuf (TAG(L.utf8_lexeme lexbuf)) | '@' (ncname|'*') -> let s = L.utf8_sub_lexeme lexbuf 1 - (L.lexeme_length lexbuf - 2) + (L.lexeme_length lexbuf - 1) in return lexbuf (ATT(s)) | '-'? ['0'-'9']+ -> let i = INT (int_of_string(L.utf8_lexeme lexbuf)) in return lexbuf i | '"' | "'" ->