Top Description Fields Constructors Methods
org.antlr.v4.runtime.tree.xpath

public Class XPathLexer

extends Lexer
Class Inheritance
Imports
org.antlr.v4.runtime.CharStream, .CommonToken, .Lexer, .LexerNoViableAltException, .Token, .Vocabulary, .VocabularyImpl, org.antlr.v4.runtime.atn.ATN, org.antlr.v4.runtime.misc.Interval

Mimic the old XPathLexer from .g4 file

Field Summary

Modifier and TypeField and Description
private static final String[]
private static final String[]
public static final int
public static final int
protected int
public static final int
protected int
public static final String[]
public static final int
public static final int
public static final String[]
public static final int
public static final int
public static final String[]
tokenNames

Deprecated Use VOCABULARY instead.
public static final Vocabulary
public static final int
Inherited from org.antlr.v4.runtime.Lexer:
_channel_factory_hitEOF_input_mode_modeStack_text_token_tokenFactorySourcePair_tokenStartCharIndex_tokenStartCharPositionInLine_tokenStartLine_typeDEFAULT_MODEDEFAULT_TOKEN_CHANNELHIDDENMAX_CHAR_VALUEMIN_CHAR_VALUEMORESKIP

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public ATN
getATN()

Implements abstract org.antlr.v4.runtime.Recognizer.getATN.

Get the ATN used by the recognizer for prediction.
public int
getCharPositionInLine()

Overrides org.antlr.v4.runtime.Lexer.getCharPositionInLine.

Implements org.antlr.v4.runtime.TokenSource.getCharPositionInLine.

Get the index into the current line for the current position in the input stream.
public String
getGrammarFileName()

Implements abstract org.antlr.v4.runtime.Recognizer.getGrammarFileName.

For debugging and other purposes, might want the grammar name.
public String[]
public String[]
public String[]
getTokenNames()

Overrides org.antlr.v4.runtime.Lexer.getTokenNames.

Deprecated
Used to print out token names like ID during debugging and error reporting.
public Vocabulary
getVocabulary()

Overrides org.antlr.v4.runtime.Recognizer.getVocabulary.

Get the vocabulary used by the recognizer.
public boolean
isNameChar(int c)

public boolean
public String
public String
public Token
nextToken()

Overrides org.antlr.v4.runtime.Lexer.nextToken.

Implements org.antlr.v4.runtime.TokenSource.nextToken.

Return a token from this source; i.e., match a token on the char stream.
Inherited from org.antlr.v4.runtime.Lexer:
emitemitemitEOFgetAllTokensgetChannelgetChannelNamesgetCharErrorDisplaygetCharIndexgetErrorDisplaygetErrorDisplaygetInputStreamgetLinegetSourceNamegetTextgetTokengetTokenFactorygetTypemodemorenotifyListenerspopModepushModerecoverrecoverresetsetChannelsetCharPositionInLinesetInputStreamsetLinesetTextsetTokensetTokenFactorysetTypeskip

Field Detail

_LITERAL_NAMESback to summary
private static final String[] _LITERAL_NAMES
_SYMBOLIC_NAMESback to summary
private static final String[] _SYMBOLIC_NAMES
ANYWHEREback to summary
public static final int ANYWHERE
BANGback to summary
public static final int BANG
charPositionInLineback to summary
protected int charPositionInLine
IDback to summary
public static final int ID
lineback to summary
protected int line
modeNamesback to summary
public static final String[] modeNames
ROOTback to summary
public static final int ROOT
RULE_REFback to summary
public static final int RULE_REF
ruleNamesback to summary
public static final String[] ruleNames
STRINGback to summary
public static final int STRING
TOKEN_REFback to summary
public static final int TOKEN_REF
tokenNamesback to summary
public static final String[] tokenNames

Deprecated

Use VOCABULARY instead.

Annotations
@Deprecated
VOCABULARYback to summary
public static final Vocabulary VOCABULARY
WILDCARDback to summary
public static final int WILDCARD

Constructor Detail

XPathLexerback to summary
public XPathLexer(CharStream input)

Method Detail

consumeback to summary
public void consume()
getATNback to summary
public ATN getATN()

Implements abstract org.antlr.v4.runtime.Recognizer.getATN.

Doc from org.antlr.v4.runtime.Recognizer.getATN.

Get the ATN used by the recognizer for prediction.

Returns:ATN

The ATN used by the recognizer for prediction.

Annotations
@Override
getCharPositionInLineback to summary
public int getCharPositionInLine()

Overrides org.antlr.v4.runtime.Lexer.getCharPositionInLine.

Implements org.antlr.v4.runtime.TokenSource.getCharPositionInLine.

Doc from org.antlr.v4.runtime.TokenSource.getCharPositionInLine.

Get the index into the current line for the current position in the input stream. The first character on a line has position 0.

Returns:int

The line number for the current position in the input stream, or -1 if the current token source does not track character positions.

Annotations
@Override
getGrammarFileNameback to summary
public String getGrammarFileName()

Implements abstract org.antlr.v4.runtime.Recognizer.getGrammarFileName.

Doc from org.antlr.v4.runtime.Recognizer.getGrammarFileName.

For debugging and other purposes, might want the grammar name. Have ANTLR generate an implementation for this method.

Annotations
@Override
getModeNamesback to summary
public String[] getModeNames()

Overrides org.antlr.v4.runtime.Lexer.getModeNames.

Annotations
@Override
getRuleNamesback to summary
public String[] getRuleNames()

Implements abstract org.antlr.v4.runtime.Recognizer.getRuleNames.

Annotations
@Override
getTokenNamesback to summary
public String[] getTokenNames()

Overrides org.antlr.v4.runtime.Lexer.getTokenNames.

Doc from org.antlr.v4.runtime.Lexer.getTokenNames.

Deprecated

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.

Annotations
@Override
@Deprecated
getVocabularyback to summary
public Vocabulary getVocabulary()

Overrides org.antlr.v4.runtime.Recognizer.getVocabulary.

Doc from org.antlr.v4.runtime.Recognizer.getVocabulary.

Get the vocabulary used by the recognizer.

Returns:Vocabulary

A Vocabulary instance providing information about the vocabulary used by the grammar.

Annotations
@Override
isNameCharback to summary
public boolean isNameChar(int c)
isNameStartCharback to summary
public boolean isNameStartChar(int c)
matchIDback to summary
public String matchID()
matchStringback to summary
public String matchString()
nextTokenback to summary
public Token nextToken()

Overrides org.antlr.v4.runtime.Lexer.nextToken.

Implements org.antlr.v4.runtime.TokenSource.nextToken.

Doc from org.antlr.v4.runtime.Lexer.nextToken.

Return a token from this source; i.e., match a token on the char stream.

Annotations
@Override