TokenSource

TODO add interface description

Members

Functions

getCharPositionInLine
int getCharPositionInLine()

@uml Get the index into the current line for the current position in the input stream. The first character on a line has position 0.

getInputStream
CharStream getInputStream()

@uml Get the {@link CharStream} from which this token source is currently providing tokens.

getLine
int getLine()

@uml Get the line number for the current position in the input stream. The first line in the input is line 1.

getSourceName
string getSourceName()

@uml Gets the name of the underlying input source. This method returns a non-null, non-empty string. If such a name is not known, this method returns {@link IntStream#UNKNOWN_SOURCE_NAME}.

nextToken
Token nextToken()

@uml Return a {@link Token} object from your input stream (usually a {@link CharStream}). Do not fail/return upon lexing error; keep chewing on the characters until you get a good one; errors are not passed through to the parser.

tokenFactory
void tokenFactory(TokenFactory!CommonToken factory)

@uml Set the {@link TokenFactory} this token source should use for creating {@link Token} objects from the input.

tokenFactory
TokenFactory!CommonToken tokenFactory()

@uml Gets the {@link TokenFactory} this token source is currently using for creating {@link Token} objects from the input.

Meta