public class SafeTokenSource
extends java.lang.Object
implements org.antlr.v4.runtime.TokenSource
| Constructor and Description |
|---|
SafeTokenSource(org.antlr.v4.runtime.TokenSource lexer,
int maxTokens,
int maxWhitespaceTokens,
java.util.function.BiConsumer<java.lang.Integer,org.antlr.v4.runtime.Token> whenMaxTokensExceeded) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCharPositionInLine() |
org.antlr.v4.runtime.CharStream |
getInputStream() |
int |
getLine() |
java.lang.String |
getSourceName() |
org.antlr.v4.runtime.TokenFactory<?> |
getTokenFactory() |
org.antlr.v4.runtime.Token |
nextToken() |
void |
setTokenFactory(org.antlr.v4.runtime.TokenFactory<?> factory) |
public SafeTokenSource(org.antlr.v4.runtime.TokenSource lexer,
int maxTokens,
int maxWhitespaceTokens,
java.util.function.BiConsumer<java.lang.Integer,org.antlr.v4.runtime.Token> whenMaxTokensExceeded)
public org.antlr.v4.runtime.Token nextToken()
nextToken in interface org.antlr.v4.runtime.TokenSourcepublic int getLine()
getLine in interface org.antlr.v4.runtime.TokenSourcepublic int getCharPositionInLine()
getCharPositionInLine in interface org.antlr.v4.runtime.TokenSourcepublic org.antlr.v4.runtime.CharStream getInputStream()
getInputStream in interface org.antlr.v4.runtime.TokenSourcepublic java.lang.String getSourceName()
getSourceName in interface org.antlr.v4.runtime.TokenSourcepublic void setTokenFactory(org.antlr.v4.runtime.TokenFactory<?> factory)
setTokenFactory in interface org.antlr.v4.runtime.TokenSourcepublic org.antlr.v4.runtime.TokenFactory<?> getTokenFactory()
getTokenFactory in interface org.antlr.v4.runtime.TokenSource