| 程序包 | 说明 |
|---|---|
| org.antlr.v4.runtime | |
| org.antlr.v4.runtime.atn | |
| org.antlr.v4.runtime.tree.pattern | |
| org.antlr.v4.runtime.tree.xpath |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
UnicodeCharStream |
| 限定符和类型 | 类和说明 |
|---|---|
class |
ANTLRFileStream
已过时。
as of 4.7 Please use
CharStreams interface. |
class |
ANTLRInputStream
已过时。
as of 4.7 Please use
CharStreams interface. |
class |
CodePointCharStream
Alternative to
ANTLRInputStream which treats the input
as a series of Unicode code points, instead of a series of UTF-16
code units. |
class |
UnbufferedCharStream
Do not buffer up the entire char stream.
|
| 限定符和类型 | 字段和说明 |
|---|---|
CharStream |
Lexer._input |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Tuple2<? extends TokenSource,CharStream> |
Lexer._tokenFactorySourcePair |
protected static Tuple2<TokenSource,CharStream> |
CommonToken.EMPTY_SOURCE
An empty
Tuple2 which is used as the default value of
CommonToken.source for tokens that do not have a source. |
protected Tuple2<? extends TokenSource,CharStream> |
CommonToken.source
This is the backing field for
CommonToken.getTokenSource() and
CommonToken.getInputStream(). |
| 限定符和类型 | 方法和说明 |
|---|---|
static CharStream |
CharStreams.fromChannel(ReadableByteChannel channel)
Creates a
CharStream given an opened ReadableByteChannel
containing UTF-8 bytes. |
static CharStream |
CharStreams.fromChannel(ReadableByteChannel channel,
Charset charset)
Creates a
CharStream given an opened ReadableByteChannel and the
charset of the bytes contained in the channel. |
static CharStream |
CharStreams.fromFile(File file)
Creates a
CharStream given a path to a UTF-8
encoded file on disk. |
static CharStream |
CharStreams.fromFile(File file,
Charset charset)
Creates a
CharStream given a path to a file on disk and the
charset of the bytes contained in the file. |
static CharStream |
CharStreams.fromFileName(String fileName)
Creates a
CharStream given a string containing a
path to a UTF-8 file on disk. |
static CharStream |
CharStreams.fromFileName(String fileName,
Charset charset)
Creates a
CharStream given a string containing a
path to a file on disk and the charset of the bytes
contained in the file. |
static CharStream |
CharStreams.fromStream(InputStream is)
Creates a
CharStream given an opened InputStream
containing UTF-8 bytes. |
static CharStream |
CharStreams.fromStream(InputStream is,
Charset charset)
Creates a
CharStream given an opened InputStream and the
charset of the bytes contained in the stream. |
static CharStream |
CharStreams.fromStream(InputStream is,
Charset charset,
String sourceName,
long inputSize) |
CharStream |
TokenSource.getInputStream()
Get the
CharStream from which this token source is currently
providing tokens. |
CharStream |
Token.getInputStream()
Gets the
CharStream from which this token was derived. |
CharStream |
ListTokenSource.getInputStream()
Get the
CharStream from which this token source is currently
providing tokens. |
CharStream |
LexerNoViableAltException.getInputStream() |
CharStream |
Lexer.getInputStream() |
CharStream |
CommonToken.getInputStream() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Lexer.setInputStream(CharStream input)
Set the char stream and reset the lexer
|
protected void |
Lexer.validateInputStream(ATN atn,
CharStream input) |
| 限定符和类型 | 方法和说明 |
|---|---|
Token |
TokenFactory.create(Tuple2<? extends TokenSource,CharStream> source,
int type,
String text,
int channel,
int start,
int stop,
int line,
int charPositionInLine)
This is the method used to create tokens in the lexer and in the
error handling strategy.
|
CommonToken |
CommonTokenFactory.create(Tuple2<? extends TokenSource,CharStream> source,
int type,
String text,
int channel,
int start,
int stop,
int line,
int charPositionInLine) |
| 构造器和说明 |
|---|
Lexer(CharStream input) |
LexerInterpreter(String grammarFileName,
Collection<String> tokenNames,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
已过时。
|
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
已过时。
|
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> channelNames,
Collection<String> modeNames,
ATN atn,
CharStream input) |
LexerNoViableAltException(Lexer lexer,
CharStream input,
int startIndex,
ATNConfigSet deadEndConfigs) |
RecognitionException(Lexer lexer,
CharStream input) |
| 构造器和说明 |
|---|
CommonToken(Tuple2<? extends TokenSource,CharStream> source,
int type,
int channel,
int start,
int stop) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
LexerATNSimulator.accept(CharStream input,
LexerActionExecutor lexerActionExecutor,
int startIndex,
int index,
int line,
int charPos) |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected boolean |
LexerATNSimulator.closure(CharStream input,
ATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative,
boolean treatEofAsEpsilon)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
protected DFAState |
LexerATNSimulator.computeTargetState(CharStream input,
DFAState s,
int t)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
void |
LexerATNSimulator.consume(CharStream input) |
protected boolean |
LexerATNSimulator.evaluatePredicate(CharStream input,
int ruleIndex,
int predIndex,
boolean speculative)
Evaluate a predicate specified in the lexer.
|
protected int |
LexerATNSimulator.execATN(CharStream input,
DFAState ds0) |
void |
LexerActionExecutor.execute(Lexer lexer,
CharStream input,
int startIndex)
Execute the actions encapsulated by this executor within the context of a
particular
Lexer. |
protected int |
LexerATNSimulator.failOrAccept(LexerATNSimulator.SimState prevAccept,
CharStream input,
ATNConfigSet reach,
int t) |
protected ATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
ATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t. |
String |
LexerATNSimulator.getText(CharStream input)
Get the text matched so far for the current token.
|
int |
LexerATNSimulator.match(CharStream input,
int mode) |
protected int |
LexerATNSimulator.matchATN(CharStream input) |
| 限定符和类型 | 方法和说明 |
|---|---|
CharStream |
RuleTagToken.getInputStream()
Gets the
CharStream from which this token was derived. |
| 构造器和说明 |
|---|
XPathLexer(CharStream input) |
Copyright © 1992–2022 Daniel Sun. All rights reserved.