public interface TokenSource
Modifier and Type | Method and Description |
---|---|
int |
getCharPositionInLine() |
CharStream |
getInputStream()
From what character stream was this token created? You don't have to
implement but it's nice to know where a Token comes from if you have
include files etc...
|
int |
getLine() |
String |
getSourceName()
Where are you getting tokens from? normally the implication will simply
ask lexers input stream.
|
TokenFactory<?> |
getTokenFactory()
Gets the factory used for constructing tokens.
|
Token |
nextToken()
Return a Token object from your input stream (usually a CharStream).
|
void |
setTokenFactory(TokenFactory<?> factory)
Optional method that lets users set factory in lexer or other source
|
Token nextToken()
int getLine()
int getCharPositionInLine()
CharStream getInputStream()
String getSourceName()
void setTokenFactory(TokenFactory<?> factory)
TokenFactory<?> getTokenFactory()
Copyright © 1992-2013 ANTLR. All Rights Reserved.