Package | Description |
---|---|
org.antlr.v4.gui | |
org.antlr.v4.runtime | |
org.antlr.v4.runtime.atn | |
org.antlr.v4.runtime.tree.pattern | |
org.antlr.v4.runtime.tree.xpath | |
org.antlr.v4.tool |
Modifier and Type | Method | Description |
---|---|---|
protected void |
TestRig.process(Lexer lexer,
Class<? extends Parser> parserClass,
Parser parser,
CharStream input) |
Modifier and Type | Class | Description |
---|---|---|
class |
ANTLRFileStream |
Deprecated.
as of 4.7 Please use
CharStreams interface. |
class |
ANTLRInputStream |
Deprecated.
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.
|
Modifier and Type | Field | Description |
---|---|---|
CharStream |
Lexer._input |
Modifier and Type | Field | Description |
---|---|---|
protected Pair<TokenSource,CharStream> |
Lexer._tokenFactorySourcePair |
|
protected static Pair<TokenSource,CharStream> |
CommonToken.EMPTY_SOURCE |
An empty
Pair which is used as the default value of
CommonToken.source for tokens that do not have a source. |
protected Pair<TokenSource,CharStream> |
CommonToken.source |
This is the backing field for
CommonToken.getTokenSource() and
CommonToken.getInputStream() . |
Modifier and Type | Method | Description |
---|---|---|
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.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.fromPath(Path path) |
Creates a
CharStream given a path to a UTF-8
encoded file on disk. |
static CharStream |
CharStreams.fromPath(Path path,
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.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,
long inputSize) |
|
CharStream |
CommonToken.getInputStream() |
|
CharStream |
Lexer.getInputStream() |
|
CharStream |
LexerNoViableAltException.getInputStream() |
|
CharStream |
ListTokenSource.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 |
TokenSource.getInputStream() |
Get the
CharStream from which this token source is currently
providing tokens. |
Modifier and Type | Method | Description |
---|---|---|
CommonToken |
CommonTokenFactory.create(Pair<TokenSource,CharStream> source,
int type,
String text,
int channel,
int start,
int stop,
int line,
int charPositionInLine) |
|
Symbol |
TokenFactory.create(Pair<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.
|
Constructor | Description |
---|---|
Lexer(CharStream input) |
|
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> channelNames,
Collection<String> modeNames,
ATN atn,
CharStream input) |
|
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input) |
Deprecated.
|
LexerNoViableAltException(Lexer lexer,
CharStream input,
int startIndex,
ATNConfigSet deadEndConfigs) |
Constructor | Description |
---|---|
CommonToken(Pair<TokenSource,CharStream> source,
int type,
int channel,
int start,
int stop) |
Modifier and Type | Method | Description |
---|---|---|
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,
LexerATNConfig 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 LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig 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) |
Modifier and Type | Method | Description |
---|---|---|
CharStream |
RuleTagToken.getInputStream() |
Gets the
CharStream from which this token was derived. |
Constructor | Description |
---|---|
XPathLexer(CharStream input) |
Modifier and Type | Method | Description |
---|---|---|
LexerInterpreter |
Grammar.createLexerInterpreter(CharStream input) |
Copyright © 1992–2019 ANTLR. All rights reserved.