Class Token

java.lang.Object
net.sf.saxon.expr.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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Operator "and"
    static final int
    ":=" symbol (XQuery only)
    static final int
    At token, "@"
    static final int
    composite token invalid input: '<''attribute' QNAME> (XQuery only)
    static final int
    Token representing the name of an axis and the following "::" symbol
    static final int
    Keyword "case"
    static final int
    operator "cast as"
    static final int
    operator "castable as"
    static final int
    "::" symbol
    static final int
    ":*" symbol
    static final int
    Comma token
    static final int
    "declare base-uri"
    static final int
    "declare boundary-space"
    static final int
    "declare construction"
    static final int
    "declare copy-namespaces"
    static final int
    "declare default"
    static final int
    "define function"
    static final int
    "declare namespace"
    static final int
    "declare option"
    static final int
    "declare xmlspace"
    static final int
    "define variable"
    static final int
    Keyword "default"
    static final int
    Operator "div"
    static final int
    "$" symbol
    static final int
    "." symbol
    static final int
    ".." symbol
    static HashMap
    Lookup table for composite (two-keyword) tokens
    static final int
    composite token invalid input: '<''element' QNAME> (XQuery only)
    static final int
    Keyword "else"
    static final int
    Pseudo-token representing the end of the expression
    static final int
    Equals token ("=")
    static final int
    Keyword "every"
    static final int
    Operator "except"
    static final int
    operator "eq"
    static final int
    operator "ge"
    static final int
    operator "gt"
    static final int
    opeartor "le"
    static final int
    operator "lt"
    static final int
    operator "ne"
    static final int
    Operator ">>"
    static final int
    "for" keyword
    static final int
    Token representing the name of a function and the following "(" symbol
    static final int
    Operator ">="
    static final int
    Operator ">"
    static final int
    operator "idiv"
    static final int
    Keyword "if"
    static final int
    "import module"
    static final int
    "import schema"
    static final int
    Keyword "in"
    static final int
    operator "instance of"
    static final int
    Operator "intersect"
    static final int
    Operator "is"
    static final int
    composite token: invalid input: '<'keyword "{"> (XQuery only)
    (package private) static int
    Constant identifying the token number of the last token to be classified as an operator
    static final int
    "{" symbol (XQuery only)
    static final int
    Operator "invalid input: '<'="
    static final int
    "let" keyword (XQuery only)
    static final int
    Left parenthesis
    static final int
    Left square bracket
    static final int
    Operator "invalid input: '<'"
    static final int
    Binary minus operator
    static final int
    Operator "mod"
    static final int
    "module namespace"
    static final int
    Multiply operator, "*" when used in an operator context
    static final int
    Name token (a QName, in general)
    static final int
    Operator not-equals.
    static final int
    Unary minus sign
    static final int
    Node kind, e.g.
    static final int
    Numeric literal
    static final int
    Operator "or"
    static final int
    composite token invalid input: '<''pi' QNAME> (XQuery only)
    static final int
    Operator "+"
    static final int
    A token representing an XQuery pragma.
    static final int
    Operator "invalid input: '<'invalid input: '<'"
    static final int
    "prefix:*" token
    static final int
    Question mark symbol.
    static final int
    "}" symbol (XQuery only)
    static final int
    Keyword "return"
    static final int
    Right parenthesis
    static final int
    Right square bracket
    static final int
    Keyword "satisfies"
    static final int
    semicolon separator
    static final int
    Forwards "/"
    static final int
    Double forwards slash, "//"
    static final int
    Keyword "some"
    static final int
    "*" symbol when used as a wildcard
    static final int
    String literal
    static final int
    "*:" token
    static final int
    "invalid input: '<'" at the start of a tag (XQuery only).
    static final int
    Ketword "then"
    static final int
    Operator "to"
    static String[]
    The following strings are used to represent tokens in error messages
    static final int
    operator "treat as"
    static final int
    Keyword "typeswitch"
    static final int
    "union" or "|" token
    static final int
    Pseudo-token representing the start of the expression
    static final int
    Various compound symbols supporting XQuery validation expression
    static final int
     
    static final int
     
    static final int
    Keyword "where"
    static final int
    "xquery version"
  • Method Summary

    Modifier and Type
    Method
    Description
    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"
    static boolean
    isOrderedOperator(int operator)
     
    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)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • inverse

      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"
    • negate

      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)
    • isOrderedOperator

      public static boolean isOrderedOperator(int operator)