Class XPathLexer

  • All Implemented Interfaces:
    TokenSource

    public class XPathLexer
    extends Lexer
    Mimic the old XPathLexer from .g4 file
    • Field Detail

      • modeNames

        public static final java.lang.String[] modeNames
      • ruleNames

        public static final java.lang.String[] ruleNames
      • _LITERAL_NAMES

        private static final java.lang.String[] _LITERAL_NAMES
      • _SYMBOLIC_NAMES

        private static final java.lang.String[] _SYMBOLIC_NAMES
      • VOCABULARY

        public static final Vocabulary VOCABULARY
      • tokenNames

        @Deprecated
        public static final java.lang.String[] tokenNames
        Deprecated.
        Use VOCABULARY instead.
      • line

        protected int line
      • charPositionInLine

        protected int charPositionInLine
    • Constructor Detail

      • XPathLexer

        public XPathLexer​(CharStream input)
    • Method Detail

      • getGrammarFileName

        public java.lang.String getGrammarFileName()
        Description copied from class: Recognizer
        For debugging and other purposes, might want the grammar name. Have ANTLR generate an implementation for this method.
        Specified by:
        getGrammarFileName in class Recognizer<java.lang.Integer,​LexerATNSimulator>
      • getModeNames

        public java.lang.String[] getModeNames()
        Overrides:
        getModeNames in class Lexer
      • getTokenNames

        @Deprecated
        public java.lang.String[] getTokenNames()
        Deprecated.
        Description copied from class: Lexer
        Used to print out token names like ID during debugging and error reporting. The generated parsers implement a method that overrides this to point to their String[] tokenNames.
        Overrides:
        getTokenNames in class Lexer
      • getATN

        public ATN getATN()
        Description copied from class: Recognizer
        Get the ATN used by the recognizer for prediction.
        Specified by:
        getATN in class Recognizer<java.lang.Integer,​LexerATNSimulator>
        Returns:
        The ATN used by the recognizer for prediction.
      • nextToken

        public Token nextToken()
        Description copied from class: Lexer
        Return a token from this source; i.e., match a token on the char stream.
        Specified by:
        nextToken in interface TokenSource
        Overrides:
        nextToken in class Lexer
      • consume

        public void consume()
      • getCharPositionInLine

        public int getCharPositionInLine()
        Description copied from interface: TokenSource
        Get the index into the current line for the current position in the input stream. The first character on a line has position 0.
        Specified by:
        getCharPositionInLine in interface TokenSource
        Overrides:
        getCharPositionInLine in class Lexer
        Returns:
        The line number for the current position in the input stream, or -1 if the current token source does not track character positions.
      • matchID

        public java.lang.String matchID()
      • matchString

        public java.lang.String matchString()
      • isNameChar

        public boolean isNameChar​(int c)
      • isNameStartChar

        public boolean isNameStartChar​(int c)