public class LexerInterpreter extends Object implements TokenSource
| Modifier and Type | Field and Description |
|---|---|
protected DFA[] |
_decisionToDFA |
protected TokenFactory<?> |
_factory
How to create token objects
|
protected PredictionContextCache |
_sharedContextCache |
protected LexerGrammar |
g |
protected CharStream |
input |
protected LexerATNSimulator |
interp |
protected Pair<TokenSource,CharStream> |
tokenFactorySourcePair |
| Constructor and Description |
|---|
LexerInterpreter(LexerGrammar g) |
LexerInterpreter(LexerGrammar g,
String inputString) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCharPositionInLine() |
CharStream |
getInputStream() |
int |
getLine() |
String |
getSourceName() |
TokenFactory<?> |
getTokenFactory() |
Token |
nextToken() |
void |
setInput(CharStream input) |
void |
setInput(String inputString) |
void |
setTokenFactory(TokenFactory<?> factory) |
protected LexerGrammar g
protected LexerATNSimulator interp
protected CharStream input
protected Pair<TokenSource,CharStream> tokenFactorySourcePair
protected TokenFactory<?> _factory
protected final DFA[] _decisionToDFA
protected final PredictionContextCache _sharedContextCache
public LexerInterpreter(LexerGrammar g, String inputString)
public LexerInterpreter(LexerGrammar g)
public void setInput(String inputString)
public void setInput(CharStream input)
public String getSourceName()
getSourceName in interface TokenSourcepublic void setTokenFactory(TokenFactory<?> factory)
setTokenFactory in interface TokenSourcepublic TokenFactory<?> getTokenFactory()
getTokenFactory in interface TokenSourcepublic int getCharPositionInLine()
getCharPositionInLine in interface TokenSourcepublic int getLine()
getLine in interface TokenSourcepublic CharStream getInputStream()
getInputStream in interface TokenSourcepublic Token nextToken()
nextToken in interface TokenSourceCopyright © 1992-2013 ANTLR. All Rights Reserved.