net.sf.saxon.expr
Class Token
public abstract
class
Token
extends Object
This class holds static constants and methods defining the lexical tokens used in
XPath and XQuery, and associated keywords.
Field Summary |
static int | AND
Operator "and" |
static int | ASSIGN
":=" symbol (XQuery only) |
static int | AT
At token, "@" |
static int | ATTRIBUTE_QNAME
composite token <'attribute' QNAME> (XQuery only) |
static int | AXIS
Token representing the name of an axis and the following "::" symbol |
static int | CASE
Keyword "case" |
static int | CASTABLE_AS
operator "castable as" |
static int | CAST_AS
operator "cast as" |
static int | COLONCOLON
"::" symbol |
static int | COLONSTAR
":*" symbol |
static int | COMMA
Comma token |
static HashMap | doubleKeywords
Lookup table for composite (two-keyword) tokens |
static int | DECLARE_BASEURI
"declare base-uri" |
static int | DECLARE_BOUNDARY_SPACE
"declare boundary-space" |
static int | DECLARE_CONSTRUCTION
"declare construction" |
static int | DECLARE_COPY_NAMESPACES
"declare copy-namespaces" |
static int | DECLARE_DEFAULT
"declare default" |
static int | DECLARE_FUNCTION
"define function" |
static int | DECLARE_NAMESPACE
"declare namespace" |
static int | DECLARE_OPTION
"declare option" |
static int | DECLARE_ORDERING
"declare xmlspace" |
static int | DECLARE_VARIABLE
"define variable" |
static int | DEFAULT
Keyword "default" |
static int | DIV
Operator "div" |
static int | DOLLAR
"$" symbol |
static int | DOT
"." symbol |
static int | DOTDOT
".." symbol |
static int | ELEMENT_QNAME
composite token <'element' QNAME> (XQuery only) |
static int | ELSE
Keyword "else" |
static int | EOF
Pseudo-token representing the end of the expression |
static int | EQUALS
Equals token ("=") |
static int | EVERY
Keyword "every" |
static int | EXCEPT
Operator "except" |
static int | FEQ
operator "eq" |
static int | FGE
operator "ge" |
static int | FGT
operator "gt" |
static int | FLE
opeartor "le" |
static int | FLT
operator "lt" |
static int | FNE
operator "ne" |
static int | FOLLOWS
Operator ">>" |
static int | FOR
"for" keyword |
static int | FUNCTION
Token representing the name of a function and the following "(" symbol |
static int | GE
Operator ">=" |
static int | GT
Operator ">" |
static int | IDIV
operator "idiv" |
static int | IF
Keyword "if" |
static int | IMPORT_MODULE
"import module" |
static int | IMPORT_SCHEMA
"import schema" |
static int | IN
Keyword "in" |
static int | INSTANCE_OF
operator "instance of" |
static int | INTERSECT
Operator "intersect" |
static int | IS
Operator "is" |
static int | KEYWORD_CURLY
composite token: (XQuery only) |
static int | LAST_OPERATOR
Constant identifying the token number of the last token to be classified as an operator |
static int | LCURLY
"{" symbol (XQuery only) |
static int | LE
Operator "<=" |
static int | LET
"let" keyword (XQuery only) |
static int | LPAR
Left parenthesis |
static int | LSQB
Left square bracket |
static int | LT
Operator "<" |
static int | MINUS
Binary minus operator |
static int | MOD
Operator "mod" |
static int | MODULE_NAMESPACE
"module namespace" |
static int | MULT
Multiply operator, "*" when used in an operator context |
static int | NAME
Name token (a QName, in general) |
static int | NE
Operator not-equals. |
static int | NEGATE
Unary minus sign |
static int | NODEKIND
Node kind, e.g. |
static int | NUMBER
Numeric literal |
static int | OR
Operator "or" |
static int | PI_QNAME
composite token <'pi' QNAME> (XQuery only) |
static int | PLUS
Operator "+" |
static int | PRAGMA
A token representing an XQuery pragma.
|
static int | PRECEDES
Operator "<<" |
static int | PREFIX
"prefix:*" token |
static int | QMARK
Question mark symbol. |
static int | RCURLY
"}" symbol (XQuery only) |
static int | RETURN
Keyword "return" |
static int | RPAR
Right parenthesis |
static int | RSQB
Right square bracket |
static int | SATISFIES
Keyword "satisfies" |
static int | SEMICOLON
semicolon separator |
static int | SLASH
Forwards "/" |
static int | SLSL
Double forwards slash, "//" |
static int | SOME
Keyword "some" |
static int | STAR
"*" symbol when used as a wildcard |
static int | STRING_LITERAL
String literal |
static int | SUFFIX
"*:" token |
static String[] | tokens
The following strings are used to represent tokens in error messages |
static int | TAG
"<" at the start of a tag (XQuery only). |
static int | THEN
Ketword "then" |
static int | TO
Operator "to" |
static int | TREAT_AS
operator "treat as" |
static int | TYPESWITCH
Keyword "typeswitch" |
static int | UNION
"union" or "|" token |
static int | UNKNOWN
Pseudo-token representing the start of the expression |
static int | VALIDATE
Various compound symbols supporting XQuery validation expression |
static int | VALIDATE_LAX |
static int | VALIDATE_STRICT |
static int | WHERE
Keyword "where" |
static int | XQUERY_VERSION
"xquery version" |
Method Summary |
static int | inverse(int operator)
Return the inverse of a relational operator, so that "a op b" can be
rewritten as "b inverse(op) a" |
static boolean | isOrderedOperator(int operator) |
static int | negate(int operator)
Return the negation of a relational operator, so that "a op b" can be
rewritten as not(b op' a) |
public static final int AND
Operator "and"
public static final int ASSIGN
":=" symbol (XQuery only)
public static final int AT
At token, "@"
public static final int ATTRIBUTE_QNAME
composite token <'attribute' QNAME> (XQuery only)
public static final int AXIS
Token representing the name of an axis and the following "::" symbol
public static final int CASE
Keyword "case"
public static final int CASTABLE_AS
operator "castable as"
public static final int CAST_AS
operator "cast as"
public static final int COLONCOLON
"::" symbol
public static final int COLONSTAR
":*" symbol
public static final int COMMA
Comma token
public static HashMap doubleKeywords
Lookup table for composite (two-keyword) tokens
public static final int DECLARE_BASEURI
"declare base-uri"
public static final int DECLARE_BOUNDARY_SPACE
"declare boundary-space"
public static final int DECLARE_CONSTRUCTION
"declare construction"
public static final int DECLARE_COPY_NAMESPACES
"declare copy-namespaces"
public static final int DECLARE_DEFAULT
"declare default"
public static final int DECLARE_FUNCTION
"define function"
public static final int DECLARE_NAMESPACE
"declare namespace"
public static final int DECLARE_OPTION
"declare option"
public static final int DECLARE_ORDERING
"declare xmlspace"
public static final int DECLARE_VARIABLE
"define variable"
public static final int DEFAULT
Keyword "default"
public static final int DIV
Operator "div"
public static final int DOLLAR
"$" symbol
public static final int DOT
"." symbol
public static final int DOTDOT
".." symbol
public static final int ELEMENT_QNAME
composite token <'element' QNAME> (XQuery only)
public static final int ELSE
Keyword "else"
public static final int EOF
Pseudo-token representing the end of the expression
public static final int EQUALS
Equals token ("=")
public static final int EVERY
Keyword "every"
public static final int EXCEPT
Operator "except"
public static final int FEQ
operator "eq"
public static final int FGE
operator "ge"
public static final int FGT
operator "gt"
public static final int FLE
opeartor "le"
public static final int FLT
operator "lt"
public static final int FNE
operator "ne"
public static final int FOLLOWS
Operator ">>"
public static final int FOR
"for" keyword
public static final int FUNCTION
Token representing the name of a function and the following "(" symbol
public static final int GE
Operator ">="
public static final int GT
Operator ">"
public static final int IDIV
operator "idiv"
public static final int IF
Keyword "if"
public static final int IMPORT_MODULE
"import module"
public static final int IMPORT_SCHEMA
"import schema"
public static final int IN
Keyword "in"
public static final int INSTANCE_OF
operator "instance of"
public static final int INTERSECT
Operator "intersect"
public static final int IS
Operator "is"
public static final int KEYWORD_CURLY
composite token: (XQuery only)
static int LAST_OPERATOR
Constant identifying the token number of the last token to be classified as an operator
public static final int LCURLY
"{" symbol (XQuery only)
public static final int LE
Operator "<="
public static final int LET
"let" keyword (XQuery only)
public static final int LPAR
Left parenthesis
public static final int LSQB
Left square bracket
public static final int LT
Operator "<"
public static final int MINUS
Binary minus operator
public static final int MOD
Operator "mod"
public static final int MODULE_NAMESPACE
"module namespace"
public static final int MULT
Multiply operator, "*" when used in an operator context
public static final int NAME
Name token (a QName, in general)
public static final int NE
Operator not-equals. That is, "!="
public static final int NEGATE
Unary minus sign
public static final int NODEKIND
Node kind, e.g. "node()" or "comment()"
public static final int NUMBER
Numeric literal
public static final int OR
Operator "or"
public static final int PI_QNAME
composite token <'pi' QNAME> (XQuery only)
public static final int PLUS
Operator "+"
public static final int PRAGMA
A token representing an XQuery pragma.
This construct "(# .... #)" is regarded as a single token, for the QueryParser to sort out.
public static final int PRECEDES
Operator "<<"
public static final int PREFIX
"prefix:*" token
public static final int QMARK
Question mark symbol. That is, "?"
public static final int RCURLY
"}" symbol (XQuery only)
public static final int RETURN
Keyword "return"
public static final int RPAR
Right parenthesis
public static final int RSQB
Right square bracket
public static final int SATISFIES
Keyword "satisfies"
public static final int SEMICOLON
semicolon separator
public static final int SLASH
Forwards "/"
public static final int SLSL
Double forwards slash, "//"
public static final int SOME
Keyword "some"
public static final int STAR
"*" symbol when used as a wildcard
public static final int STRING_LITERAL
String literal
public static final int SUFFIX
"*:" token
public static String[] tokens
The following strings are used to represent tokens in error messages
public static final int TAG
"<" at the start of a tag (XQuery only). The pseudo-XML syntax that
follows is read character-by-character by the XQuery parser
public static final int THEN
Ketword "then"
public static final int TO
Operator "to"
public static final int TREAT_AS
operator "treat as"
public static final int TYPESWITCH
Keyword "typeswitch"
public static final int UNION
"union" or "|" token
public static final int UNKNOWN
Pseudo-token representing the start of the expression
public static final int VALIDATE
Various compound symbols supporting XQuery validation expression
public static final int VALIDATE_LAX
public static final int VALIDATE_STRICT
public static final int WHERE
Keyword "where"
public static final int XQUERY_VERSION
"xquery version"
public static final int inverse(int operator)
Return the inverse of a relational operator, so that "a op b" can be
rewritten as "b inverse(op) a"
public static boolean isOrderedOperator(int operator)
public static final int negate(int operator)
Return the negation of a relational operator, so that "a op b" can be
rewritten as not(b op' a)