Package org.antlr.v4.runtime
Class LexerInterpreter
- java.lang.Object
-
- org.antlr.v4.runtime.Recognizer<java.lang.Integer,LexerATNSimulator>
-
- org.antlr.v4.runtime.Lexer
-
- org.antlr.v4.runtime.LexerInterpreter
-
- All Implemented Interfaces:
TokenSource
public class LexerInterpreter extends Lexer
-
-
Field Summary
Fields Modifier and Type Field Description protected DFA[]_decisionToDFAprotected PredictionContextCache_sharedContextCacheprotected ATNatnprotected java.lang.String[]channelNamesprotected java.lang.StringgrammarFileNameprotected java.lang.String[]modeNamesprotected java.lang.String[]ruleNamesprotected java.lang.String[]tokenNamesDeprecated.private Vocabularyvocabulary-
Fields inherited from class org.antlr.v4.runtime.Lexer
_channel, _factory, _hitEOF, _input, _mode, _modeStack, _text, _token, _tokenFactorySourcePair, _tokenStartCharIndex, _tokenStartCharPositionInLine, _tokenStartLine, _type, DEFAULT_MODE, DEFAULT_TOKEN_CHANNEL, HIDDEN, MAX_CHAR_VALUE, MIN_CHAR_VALUE, MORE, SKIP
-
Fields inherited from class org.antlr.v4.runtime.Recognizer
_interp, EOF
-
-
Constructor Summary
Constructors Constructor Description LexerInterpreter(java.lang.String grammarFileName, java.util.Collection<java.lang.String> tokenNames, java.util.Collection<java.lang.String> ruleNames, java.util.Collection<java.lang.String> modeNames, ATN atn, CharStream input)Deprecated.LexerInterpreter(java.lang.String grammarFileName, Vocabulary vocabulary, java.util.Collection<java.lang.String> ruleNames, java.util.Collection<java.lang.String> channelNames, java.util.Collection<java.lang.String> modeNames, ATN atn, CharStream input)LexerInterpreter(java.lang.String grammarFileName, Vocabulary vocabulary, java.util.Collection<java.lang.String> ruleNames, java.util.Collection<java.lang.String> modeNames, ATN atn, CharStream input)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ATNgetATN()Get theATNused by the recognizer for prediction.java.lang.String[]getChannelNames()java.lang.StringgetGrammarFileName()For debugging and other purposes, might want the grammar name.java.lang.String[]getModeNames()java.lang.String[]getRuleNames()java.lang.String[]getTokenNames()Deprecated.VocabularygetVocabulary()Get the vocabulary used by the recognizer.-
Methods inherited from class org.antlr.v4.runtime.Lexer
emit, emit, emitEOF, getAllTokens, getChannel, getCharErrorDisplay, getCharIndex, getCharPositionInLine, getErrorDisplay, getErrorDisplay, getInputStream, getLine, getSourceName, getText, getToken, getTokenFactory, getType, mode, more, nextToken, notifyListeners, popMode, pushMode, recover, recover, reset, setChannel, setCharPositionInLine, setInputStream, setLine, setText, setToken, setTokenFactory, setType, skip
-
Methods inherited from class org.antlr.v4.runtime.Recognizer
action, addErrorListener, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getInterpreter, getParseInfo, getRuleIndexMap, getSerializedATN, getState, getTokenErrorDisplay, getTokenType, getTokenTypeMap, precpred, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
-
-
-
-
Field Detail
-
grammarFileName
protected final java.lang.String grammarFileName
-
atn
protected final ATN atn
-
tokenNames
@Deprecated protected final java.lang.String[] tokenNames
Deprecated.
-
ruleNames
protected final java.lang.String[] ruleNames
-
channelNames
protected final java.lang.String[] channelNames
-
modeNames
protected final java.lang.String[] modeNames
-
vocabulary
private final Vocabulary vocabulary
-
_decisionToDFA
protected final DFA[] _decisionToDFA
-
_sharedContextCache
protected final PredictionContextCache _sharedContextCache
-
-
Constructor Detail
-
LexerInterpreter
@Deprecated public LexerInterpreter(java.lang.String grammarFileName, java.util.Collection<java.lang.String> tokenNames, java.util.Collection<java.lang.String> ruleNames, java.util.Collection<java.lang.String> modeNames, ATN atn, CharStream input)Deprecated.
-
LexerInterpreter
@Deprecated public LexerInterpreter(java.lang.String grammarFileName, Vocabulary vocabulary, java.util.Collection<java.lang.String> ruleNames, java.util.Collection<java.lang.String> modeNames, ATN atn, CharStream input)Deprecated.
-
LexerInterpreter
public LexerInterpreter(java.lang.String grammarFileName, Vocabulary vocabulary, java.util.Collection<java.lang.String> ruleNames, java.util.Collection<java.lang.String> channelNames, java.util.Collection<java.lang.String> modeNames, ATN atn, CharStream input)
-
-
Method Detail
-
getATN
public ATN getATN()
Description copied from class:RecognizerGet theATNused by the recognizer for prediction.- Specified by:
getATNin classRecognizer<java.lang.Integer,LexerATNSimulator>- Returns:
- The
ATNused by the recognizer for prediction.
-
getGrammarFileName
public java.lang.String getGrammarFileName()
Description copied from class:RecognizerFor debugging and other purposes, might want the grammar name. Have ANTLR generate an implementation for this method.- Specified by:
getGrammarFileNamein classRecognizer<java.lang.Integer,LexerATNSimulator>
-
getTokenNames
@Deprecated public java.lang.String[] getTokenNames()
Deprecated.Description copied from class:LexerUsed 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:
getTokenNamesin classLexer
-
getRuleNames
public java.lang.String[] getRuleNames()
- Specified by:
getRuleNamesin classRecognizer<java.lang.Integer,LexerATNSimulator>
-
getChannelNames
public java.lang.String[] getChannelNames()
- Overrides:
getChannelNamesin classLexer
-
getModeNames
public java.lang.String[] getModeNames()
- Overrides:
getModeNamesin classLexer
-
getVocabulary
public Vocabulary getVocabulary()
Description copied from class:RecognizerGet the vocabulary used by the recognizer.- Overrides:
getVocabularyin classRecognizer<java.lang.Integer,LexerATNSimulator>- Returns:
- A
Vocabularyinstance providing information about the vocabulary used by the grammar.
-
-