Top Fields Constructors Methods
org.antlr.v4.runtime

public Class LexerInterpreter

extends Lexer
Class Inheritance
Imports
org.antlr.v4.runtime.atn.ATN, .ATNType, .LexerATNSimulator, .PredictionContextCache, org.antlr.v4.runtime.dfa.DFA, java.util.ArrayList, .Collection

Field Summary

Modifier and TypeField and Description
protected final DFA[]
protected final PredictionContextCache
protected final ATN
protected final String[]
protected final String
protected final String[]
protected final String[]
protected final String[]
tokenNames

Deprecated
private final Vocabulary
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
LexerInterpreter(String grammarFileName, Collection<String> tokenNames, Collection<String> ruleNames, Collection<String> modeNames, ATN atn, CharStream input)

Deprecated
public
LexerInterpreter(String grammarFileName, Vocabulary vocabulary, Collection<String> ruleNames, Collection<String> modeNames, ATN atn, CharStream input)

Deprecated
public
LexerInterpreter(String grammarFileName, Vocabulary vocabulary, Collection<String> ruleNames, Collection<String> channelNames, Collection<String> modeNames, ATN atn, CharStream input)

Method Summary

Modifier and TypeMethod and Description
public ATN
getATN()

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

Get the ATN used by the recognizer for prediction.
public String[]
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.
Inherited from org.antlr.v4.runtime.Lexer:
emitemitemitEOFgetAllTokensgetChannelgetCharErrorDisplaygetCharIndexgetCharPositionInLinegetErrorDisplaygetErrorDisplaygetInputStreamgetLinegetSourceNamegetTextgetTokengetTokenFactorygetTypemodemorenextTokennotifyListenerspopModepushModerecoverrecoverresetsetChannelsetCharPositionInLinesetInputStreamsetLinesetTextsetTokensetTokenFactorysetTypeskip

Field Detail

_decisionToDFAback to summary
protected final DFA[] _decisionToDFA
_sharedContextCacheback to summary
protected final PredictionContextCache _sharedContextCache
atnback to summary
protected final ATN atn
channelNamesback to summary
protected final String[] channelNames
grammarFileNameback to summary
protected final String grammarFileName
modeNamesback to summary
protected final String[] modeNames
ruleNamesback to summary
protected final String[] ruleNames
tokenNamesback to summary
protected final String[] tokenNames

Deprecated

Annotations
@Deprecated
vocabularyback to summary
private final Vocabulary vocabulary

Constructor Detail

LexerInterpreterback to summary
public LexerInterpreter(String grammarFileName, Collection<String> tokenNames, Collection<String> ruleNames, Collection<String> modeNames, ATN atn, CharStream input)

Deprecated

Annotations
@Deprecated
LexerInterpreterback to summary
public LexerInterpreter(String grammarFileName, Vocabulary vocabulary, Collection<String> ruleNames, Collection<String> modeNames, ATN atn, CharStream input)

Deprecated

Annotations
@Deprecated
LexerInterpreterback to summary
public LexerInterpreter(String grammarFileName, Vocabulary vocabulary, Collection<String> ruleNames, Collection<String> channelNames, Collection<String> modeNames, ATN atn, CharStream input)

Method Detail

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
getChannelNamesback to summary
public String[] getChannelNames()

Overrides org.antlr.v4.runtime.Lexer.getChannelNames.

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