Uses of Interface
org.antlr.v4.runtime.TokenSource
-
Packages that use TokenSource Package Description org.antlr.v4.runtime org.antlr.v4.runtime.tree.pattern org.antlr.v4.runtime.tree.xpath -
-
Uses of TokenSource in org.antlr.v4.runtime
Classes in org.antlr.v4.runtime that implement TokenSource Modifier and Type Class Description class
Lexer
A lexer is recognizer that draws input symbols from a character stream.class
LexerInterpreter
class
ListTokenSource
Provides an implementation ofTokenSource
as a wrapper around a list ofToken
objects.Fields in org.antlr.v4.runtime declared as TokenSource Modifier and Type Field Description protected TokenSource
BufferedTokenStream. tokenSource
TheTokenSource
from which tokens for this stream are fetched.protected TokenSource
UnbufferedTokenStream. tokenSource
Fields in org.antlr.v4.runtime with type parameters of type TokenSource Modifier and Type Field Description protected Pair<TokenSource,CharStream>
Lexer. _tokenFactorySourcePair
protected static Pair<TokenSource,CharStream>
CommonToken. EMPTY_SOURCE
An emptyPair
which is used as the default value ofCommonToken.source
for tokens that do not have a source.protected Pair<TokenSource,CharStream>
CommonToken. source
This is the backing field forCommonToken.getTokenSource()
andCommonToken.getInputStream()
.Methods in org.antlr.v4.runtime that return TokenSource Modifier and Type Method Description TokenSource
BufferedTokenStream. getTokenSource()
TokenSource
CommonToken. getTokenSource()
TokenSource
Token. getTokenSource()
Gets theTokenSource
which created this token.TokenSource
TokenStream. getTokenSource()
Gets the underlyingTokenSource
which provides tokens for this stream.TokenSource
UnbufferedTokenStream. getTokenSource()
Methods in org.antlr.v4.runtime with parameters of type TokenSource Modifier and Type Method Description void
BufferedTokenStream. setTokenSource(TokenSource tokenSource)
Reset this token stream by setting its token source.Method parameters in org.antlr.v4.runtime with type arguments of type TokenSource 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.Constructors in org.antlr.v4.runtime with parameters of type TokenSource Constructor Description BufferedTokenStream(TokenSource tokenSource)
CommonTokenStream(TokenSource tokenSource)
Constructs a newCommonTokenStream
using the specified token source and the default token channel (Token.DEFAULT_CHANNEL
).CommonTokenStream(TokenSource tokenSource, int channel)
Constructs a newCommonTokenStream
using the specified token source and filtering tokens to the specified channel.UnbufferedTokenStream(TokenSource tokenSource)
UnbufferedTokenStream(TokenSource tokenSource, int bufferSize)
Constructor parameters in org.antlr.v4.runtime with type arguments of type TokenSource Constructor Description CommonToken(Pair<TokenSource,CharStream> source, int type, int channel, int start, int stop)
-
Uses of TokenSource in org.antlr.v4.runtime.tree.pattern
Methods in org.antlr.v4.runtime.tree.pattern that return TokenSource Modifier and Type Method Description TokenSource
RuleTagToken. getTokenSource()
Gets theTokenSource
which created this token. -
Uses of TokenSource in org.antlr.v4.runtime.tree.xpath
Classes in org.antlr.v4.runtime.tree.xpath that implement TokenSource Modifier and Type Class Description class
XPathLexer
Mimic the old XPathLexer from .g4 file
-