Class Token


  • public abstract class Token
    extends java.lang.Object
    This class holds static constants and methods defining the lexical tokens used in XPath and XQuery, and associated keywords.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int AFTER
      "after"
      static int AND
      Operator "and"
      static int AND_ALSO
      "andAlso" (Saxon extension)
      static int AS
      "as" (in XQuery Update rename expression)
      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 BANG
      Operator "!"
      static int BANG_BANG  
      static int BEFORE
      "before"
      static int BY
      "by"
      static int CASE
      Keyword "case"
      static int CAST_AS
      operator "cast as"
      static int CASTABLE_AS
      operator "castable as"
      static int COLON
      ":" (XPath 3.0 maps)
      static int COLONCOLON
      "::" symbol
      static int COLONSTAR
      ":*" symbol
      static int COMMA
      Comma token
      static int CONCAT
      Operator "||"
      static int COPY
      "copy" keyword
      static int COUNT
      "count" keyword
      static int DECLARE_ANNOTATED
      declare %
      static int DECLARE_BASEURI
      "declare base-uri"
      static int DECLARE_BOUNDARY_SPACE
      "declare boundary-space"
      static int DECLARE_CONSTRUCTION
      "declare construction"
      static int DECLARE_CONTEXT
      "declare context"
      static int DECLARE_COPY_NAMESPACES
      "declare copy-namespaces"
      static int DECLARE_DECIMAL_FORMAT
      "declare decimal-format"
      static int DECLARE_DEFAULT
      "declare default"
      static int DECLARE_FUNCTION
      "declare function"
      static int DECLARE_NAMESPACE
      "declare namespace"
      static int DECLARE_OPTION
      "declare option"
      static int DECLARE_ORDERING
      "declare xmlspace"
      static int DECLARE_REVALIDATION
      "declare revalidation"
      static int DECLARE_TYPE
      Saxon extension: declare type
      static int DECLARE_UPDATING
      "declare updating [function]"
      static int DECLARE_VARIABLE
      "declare variable"
      static int DEFAULT
      Keyword "default"
      static int DELETE_NODE
      "delete node/nodes"
      static int DIV
      Operator "div"
      static int DOLLAR
      "$" symbol
      static int DOT
      "." symbol
      static int DOTDOT
      ".." symbol
      static java.util.HashMap<java.lang.String,​java.lang.Integer> doubleKeywords
      Lookup table for composite (two-keyword) tokens
      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 FAT_ARROW
      Arrow operator "=>" (XQuery 3.1)
      static int FEQ
      operator "eq"
      static int FGE
      operator "ge"
      static int FGT
      operator "gt"
      static int FIRST_INTO
      "first into"
      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 FOR_MEMBER
      "for member" (XQuery 4.0)
      static int FOR_SLIDING
      "for sliding" (XQuery 3.0)
      static int FOR_TUMBLING
      "for tumbling" (XQuery 3.0)
      static int FUNCTION
      Token representing the name of a function and the following "(" symbol
      static int GE
      Operator ">="
      static int GROUP_BY  
      static int GT
      Operator ">"
      static int HASH
      # symbol
      static int IDIV
      operator "idiv"
      static int IF
      Keyword "if"
      static int IMPLICIT_EOF
      Pseudo-token representing implicit end of expression (the parser doesn't care what follows the expression)
      static int IMPORT_MODULE
      "import module"
      static int IMPORT_SCHEMA
      "import schema"
      static int IN
      Keyword "in"
      static int INSERT_NODE
      "insert node/nodes"
      static int INSTANCE_OF
      operator "instance of"
      static int INTERSECT
      Operator "intersect"
      static int INTO
      "into"
      static int IS
      Operator "is"
      static int KEYWORD_CURLY
      composite token: <keyword "{"> (XQuery only)
      static int LAST_INTO
      "last into"
      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 MODIFY
      Keyword "modify"
      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 NAMED_FUNCTION_REF
      Token representing a function name and the following "#" symbol
      static int NAMESPACE_QNAME
      composite token <'namespace' QNAME> (XQuery only)
      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 OR_ELSE
      "orElse" (Saxon extension)
      static int OTHERWISE
      "otherwise" (Saxon extension)
      static int PERCENT
      percent sign '%'
      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 QMARK_QMARK
      operator "??"
      static int RCURLY
      "}" symbol (XQuery only)
      static int RENAME_NODE
      "rename node"
      static int REPLACE_NODE
      "replace node/nodes"
      static int REPLACE_VALUE
      "replace value"
      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 SLASH_SLASH
      Double forwards slash, "//"
      static int SOME
      Keyword "some"
      static int STAR
      "*" symbol when used as a wildcard
      static int STRING_CONSTRUCTOR_INITIAL
      First part of a string template.
      static int STRING_LITERAL
      String literal
      static int STRING_LITERAL_BACKTICKED
      Complete string template with no embedded expressions
      static int SUFFIX
      "*:" token
      static int SWITCH
      Keyword "switch" (XQuery 1.1)
      static int TAG
      "<" at the start of a tag (XQuery only).
      static int THEN
      Ketword "then"
      static int THIN_ARROW
      Thin arrow operator "->" (XQuery 4.0)
      static int TO
      Operator "to"
      static java.lang.String[] tokens
      The following strings are used to represent tokens in error messages
      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 VALIDATE_TYPE  
      static int WHERE
      Keyword "where"
      static int WITH
      "with"
      static int XQUERY_ENCODING
      "xquery encoding"
      static int XQUERY_VERSION
      "xquery version"
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait