Java.target.apidocs.org.antlr.v4.runtime.LexerInterpreter.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of antlr4-perf-testsuite Show documentation
Show all versions of antlr4-perf-testsuite Show documentation
The ANTLR 4 grammar compiler.
LexerInterpreter (ANTLR 4 Runtime (Optimized) 4.7.3 API)
org.antlr.v4.runtime
Class LexerInterpreter
- java.lang.Object
-
- org.antlr.v4.runtime.Recognizer<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 and Description
protected ATN
atn
protected String[]
channelNames
protected String
grammarFileName
protected String[]
modeNames
protected String[]
ruleNames
protected String[]
tokenNames
Deprecated.
-
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 and Description
LexerInterpreter(String grammarFileName,
Collection<String> tokenNames,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
Deprecated.
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
Deprecated.
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> channelNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
-
Method Summary
Methods
Modifier and Type
Method and Description
ATN
getATN()
Get the ATN
used by the recognizer for prediction.
String[]
getChannelNames()
String
getGrammarFileName()
For debugging and other purposes, might want the grammar name.
String[]
getModeNames()
String[]
getRuleNames()
String[]
getTokenNames()
Deprecated.
Vocabulary
getVocabulary()
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, validateInputStream
-
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 String grammarFileName
-
atn
protected final ATN atn
-
tokenNames
@Deprecated
protected final String[] tokenNames
Deprecated.
-
ruleNames
protected final String[] ruleNames
-
channelNames
protected final String[] channelNames
-
modeNames
protected final String[] modeNames
-
Constructor Detail
-
LexerInterpreter
@Deprecated
public LexerInterpreter(String grammarFileName,
Collection<String> tokenNames,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
Deprecated.
-
LexerInterpreter
@Deprecated
public LexerInterpreter(String grammarFileName,
@NotNull
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
Deprecated.
-
LexerInterpreter
public LexerInterpreter(String grammarFileName,
@NotNull
Vocabulary vocabulary,
Collection<String> ruleNames,
@Nullable
Collection<String> channelNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
-
Method Detail
-
getATN
public ATN getATN()
Description copied from class: Recognizer
Get the ATN
used by the recognizer for prediction.
- Overrides:
getATN
in class Recognizer<Integer,LexerATNSimulator>
- Returns:
- The
ATN
used by the recognizer for prediction.
-
getGrammarFileName
public 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<Integer,LexerATNSimulator>
-
getTokenNames
@Deprecated
public 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
-
getRuleNames
public String[] getRuleNames()
- Specified by:
getRuleNames
in class Recognizer<Integer,LexerATNSimulator>
-
getChannelNames
public String[] getChannelNames()
- Overrides:
getChannelNames
in class Lexer
-
getModeNames
public String[] getModeNames()
- Overrides:
getModeNames
in class Lexer
-
getVocabulary
public Vocabulary getVocabulary()
Description copied from class: Recognizer
Get the vocabulary used by the recognizer.
- Overrides:
getVocabulary
in class Recognizer<Integer,LexerATNSimulator>
- Returns:
- A
Vocabulary
instance providing information about the
vocabulary used by the grammar.
Copyright © 1992–2019 Tunnel Vision Laboratories, LLC. All rights reserved.