Uses of Interface
org.antlr.v4.runtime.Token
-
Packages that use Token Package Description org.antlr.v4.runtime org.antlr.v4.runtime.tree org.antlr.v4.runtime.tree.pattern org.antlr.v4.runtime.tree.xpath -
-
Uses of Token in org.antlr.v4.runtime
Classes in org.antlr.v4.runtime with type parameters of type Token Modifier and Type Interface Description interfaceTokenFactory<Symbol extends Token>The default mechanism for creating tokens.classUnbufferedTokenStream<T extends Token>Subinterfaces of Token in org.antlr.v4.runtime Modifier and Type Interface Description interfaceWritableTokenClasses in org.antlr.v4.runtime that implement Token Modifier and Type Class Description classCommonTokenFields in org.antlr.v4.runtime declared as Token Modifier and Type Field Description TokenLexer. _tokenThe goal of all lexer rules/methods is to create a token object.protected TokenListTokenSource. eofTokenThis field caches the EOF token for the token source.protected TokenUnbufferedTokenStream. lastTokenThis is theLT(-1)token for the current position.protected TokenUnbufferedTokenStream. lastTokenBufferStartTokenParserRuleContext. startFor debugging/tracing purposes, we want to track all of the nodes in the ATN traversed by the parser for a particular rule.TokenParserRuleContext. stopFor debugging/tracing purposes, we want to track all of the nodes in the ATN traversed by the parser for a particular rule.protected Token[]UnbufferedTokenStream. tokensA moving window buffer of the data being scanned.Fields in org.antlr.v4.runtime with type parameters of type Token Modifier and Type Field Description protected List<Token>BufferedTokenStream. tokensA collection of all tokens fetched from the token source.protected List<? extends Token>ListTokenSource. tokensThe wrapped collection ofTokenobjects to return.Methods in org.antlr.v4.runtime that return Token Modifier and Type Method Description TokenParser. consume()Consume and return the current symbol.TokenLexer. emit()The standard method called to automatically emit a token at the outermost lexical rule.TokenLexer. emitEOF()TokenBufferedTokenStream. get(int i)TokenTokenStream. get(int index)Gets theTokenat the specifiedindexin the stream.TokenUnbufferedTokenStream. get(int i)TokenParser. getCurrentToken()Match needs to return the current input symbol, which gets put into the label for the associated token ref; e.g., x=ID.protected TokenDefaultErrorStrategy. getMissingSymbol(Parser recognizer)Conjure up a missing token during error recovery.TokenRecognitionException. getOffendingToken()TokenParserRuleContext. getStart()Get the initial token in this context.TokenNoViableAltException. getStartToken()TokenParserRuleContext. getStop()Get the final token in this context.TokenLexer. getToken()Override if emitting multiple tokens.protected TokenBufferedTokenStream. LB(int k)protected TokenCommonTokenStream. LB(int k)TokenBufferedTokenStream. LT(int k)TokenCommonTokenStream. LT(int k)TokenTokenStream. LT(int k)TokenUnbufferedTokenStream. LT(int i)TokenParser. match(int ttype)Match current input symbol againstttype.TokenParser. matchWildcard()Match current input symbol as a wildcard.TokenLexer. nextToken()Return a token from this source; i.e., match a token on the char stream.TokenListTokenSource. nextToken()Return aTokenobject from your input stream (usually aCharStream).TokenTokenSource. nextToken()Return aTokenobject from your input stream (usually aCharStream).TokenANTLRErrorStrategy. recoverInline(Parser recognizer)This method is called when an unexpected symbol is encountered during an inline match operation, such asParser.match(int).TokenBailErrorStrategy. recoverInline(Parser recognizer)Make sure we don't attempt to recover inline; if the parser successfully recovers, it won't throw an exception.TokenDefaultErrorStrategy. recoverInline(Parser recognizer)This method is called when an unexpected symbol is encountered during an inline match operation, such asParser.match(int).protected TokenParserInterpreter. recoverInline()protected TokenDefaultErrorStrategy. singleTokenDeletion(Parser recognizer)This method implements the single-token deletion inline error recovery strategy.Methods in org.antlr.v4.runtime that return types with arguments of type Token Modifier and Type Method Description protected List<Token>BufferedTokenStream. filterForChannel(int from, int to, int channel)List<Token>BufferedTokenStream. get(int start, int stop)Get all tokens from start..stop inclusivelyList<? extends Token>Lexer. getAllTokens()Return a list of all Token objects in input char stream.List<Token>BufferedTokenStream. getHiddenTokensToLeft(int tokenIndex)Collect all hidden tokens (any off-default channel) to the left of the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.List<Token>BufferedTokenStream. getHiddenTokensToLeft(int tokenIndex, int channel)Collect all tokens on specified channel to the left of the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.List<Token>BufferedTokenStream. getHiddenTokensToRight(int tokenIndex)Collect all hidden tokens (any off-default channel) to the right of the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or EOF.List<Token>BufferedTokenStream. getHiddenTokensToRight(int tokenIndex, int channel)Collect all tokens on specified channel to the right of the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or EOF.TokenFactory<? extends Token>Lexer. getTokenFactory()List<Token>BufferedTokenStream. getTokens()List<Token>BufferedTokenStream. getTokens(int start, int stop)List<Token>BufferedTokenStream. getTokens(int start, int stop, int ttype)List<Token>BufferedTokenStream. getTokens(int start, int stop, Set<Integer> types)Given a start and stop index, return a List of all tokens in the token type BitSet.Methods in org.antlr.v4.runtime with parameters of type Token Modifier and Type Method Description protected voidUnbufferedTokenStream. add(Token t)TerminalNodeParserRuleContext. addChild(Token matchedToken)Deprecated.ErrorNodeParserRuleContext. addErrorNode(Token badToken)Deprecated.ErrorNodeParser. createErrorNode(ParserRuleContext parent, Token t)How to create an error node, given a token, associated with a parent.TerminalNodeParser. createTerminalNode(ParserRuleContext parent, Token t)How to create a token leaf node associated with a parent.voidTokenStreamRewriter. delete(String programName, Token from, Token to)voidTokenStreamRewriter. delete(Token indexT)voidTokenStreamRewriter. delete(Token from, Token to)voidLexer. emit(Token token)By default does not support multiple emits per nextToken invocation for efficiency reasons.protected StringDefaultErrorStrategy. getSymbolText(Token symbol)protected intDefaultErrorStrategy. getSymbolType(Token symbol)StringBufferedTokenStream. getText(Token start, Token stop)StringTokenStream. getText(Token start, Token stop)Return the text of all tokens in this stream betweenstartandstop(inclusive).StringUnbufferedTokenStream. getText(Token start, Token stop)protected StringDefaultErrorStrategy. getTokenErrorDisplay(Token t)How should a token be displayed in an error message? The default is to display just the text, but during development you might want to have a lot of information spit out.StringRecognizer. getTokenErrorDisplay(Token t)Deprecated.This method is not called by the ANTLR 4 Runtime.voidTokenStreamRewriter. insertAfter(String programName, Token t, Object text)voidTokenStreamRewriter. insertAfter(Token t, Object text)voidTokenStreamRewriter. insertBefore(String programName, Token t, Object text)voidTokenStreamRewriter. insertBefore(Token t, Object text)voidParser. notifyErrorListeners(Token offendingToken, String msg, RecognitionException e)voidTokenStreamRewriter. replace(String programName, Token from, Token to, Object text)voidTokenStreamRewriter. replace(Token indexT, Object text)voidTokenStreamRewriter. replace(Token from, Token to, Object text)protected voidRecognitionException. setOffendingToken(Token offendingToken)voidLexer. setToken(Token _token)Constructors in org.antlr.v4.runtime with parameters of type Token Constructor Description CommonToken(Token oldToken)Constructs a newCommonTokenas a copy of anotherToken.NoViableAltException(Parser recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx)Constructor parameters in org.antlr.v4.runtime with type arguments of type Token Constructor Description ListTokenSource(List<? extends Token> tokens)Constructs a newListTokenSourceinstance from the specified collection ofTokenobjects.ListTokenSource(List<? extends Token> tokens, String sourceName)Constructs a newListTokenSourceinstance from the specified collection ofTokenobjects and source name. -
Uses of Token in org.antlr.v4.runtime.tree
Fields in org.antlr.v4.runtime.tree declared as Token Modifier and Type Field Description TokenTerminalNodeImpl. symbolMethods in org.antlr.v4.runtime.tree that return Token Modifier and Type Method Description TokenTerminalNodeImpl. getPayload()TokenTerminalNode. getSymbol()TokenTerminalNodeImpl. getSymbol()Constructors in org.antlr.v4.runtime.tree with parameters of type Token Constructor Description ErrorNodeImpl(Token token)TerminalNodeImpl(Token symbol) -
Uses of Token in org.antlr.v4.runtime.tree.pattern
Classes in org.antlr.v4.runtime.tree.pattern that implement Token Modifier and Type Class Description classRuleTagTokenATokenobject representing an entire subtree matched by a parser rule; e.g.,<expr>.classTokenTagTokenATokenobject representing a token of a particular type; e.g.,<ID>.Methods in org.antlr.v4.runtime.tree.pattern that return types with arguments of type Token Modifier and Type Method Description List<? extends Token>ParseTreePatternMatcher. tokenize(String pattern) -
Uses of Token in org.antlr.v4.runtime.tree.xpath
Methods in org.antlr.v4.runtime.tree.xpath that return Token Modifier and Type Method Description TokenXPathLexer. nextToken()Methods in org.antlr.v4.runtime.tree.xpath with parameters of type Token Modifier and Type Method Description protected XPathElementXPath. getXPathElement(Token wordToken, boolean anywhere)Convert word like*orIDorexprto a path element.
-