Uses of Interface
org.antlr.runtime.Token
-
Packages that use Token Package Description org.antlr.analysis org.antlr.codegen org.antlr.grammar.v3 org.antlr.runtime org.antlr.runtime.debug org.antlr.runtime.tree org.antlr.tool -
-
Uses of Token in org.antlr.analysis
Fields in org.antlr.analysis with type parameters of type Token Modifier and Type Field Description protected java.util.Map<DFAState,java.util.Map<java.lang.Integer,java.util.Set<Token>>>DecisionProbe. stateToIncompletelyCoveredAltsMapTracks alts insufficiently covered.Methods in org.antlr.analysis that return types with arguments of type Token Modifier and Type Method Description java.util.List<Token>MachineProbe. getGrammarLocationsForInputSequence(java.util.List<java.util.Set<NFAState>> nfaStates, java.util.List<IntSet> labels)Given an alternative associated with a DFA state, return the list of tokens (from grammar) associated with path through NFA following the labels sequence.java.util.Map<java.lang.Integer,java.util.Set<Token>>DecisionProbe. getIncompletelyCoveredAlts(DFAState d)Return a list of alts whose predicate context was insufficient to resolve a nondeterminism for state d.Method parameters in org.antlr.analysis with type arguments of type Token Modifier and Type Method Description voidDecisionProbe. reportIncompletelyCoveredAlts(DFAState d, java.util.Map<java.lang.Integer,java.util.Set<Token>> altToLocationsReachableWithoutPredicate) -
Uses of Token in org.antlr.codegen
Methods in org.antlr.codegen with parameters of type Token Modifier and Type Method Description voidCodeGenerator. issueInvalidAttributeError(java.lang.String x, java.lang.String y, Rule enclosingRule, Token actionToken, int outerAltNum)voidCodeGenerator. issueInvalidAttributeError(java.lang.String x, Rule enclosingRule, Token actionToken, int outerAltNum)voidCodeGenerator. issueInvalidScopeError(java.lang.String x, java.lang.String y, Rule enclosingRule, Token actionToken, int outerAltNum)java.util.List<java.lang.Object>Python3Target. postProcessAction(java.util.List<java.lang.Object> chunks, Token actionToken)java.util.List<java.lang.Object>PythonTarget. postProcessAction(java.util.List<java.lang.Object> chunks, Token actionToken)java.util.List<java.lang.Object>Target. postProcessAction(java.util.List<java.lang.Object> chunks, Token actionToken)Give target a chance to do some postprocessing on actions.org.stringtemplate.v4.STCodeGenerator. translateTemplateConstructor(java.lang.String ruleName, int outerAltNum, Token actionToken, java.lang.String templateActionText)Given a template constructor action like %foo(a={...}) in an action, translate it to the appropriate template constructor from the templateLib. -
Uses of Token in org.antlr.grammar.v3
Fields in org.antlr.grammar.v3 declared as Token Modifier and Type Field Description (package private) TokenActionAnalysis. actionToken(package private) TokenActionTranslator. actionTokenTokenANTLRParser.GrammarASTErrorNode. startTokenANTLRParser.GrammarASTErrorNode. stopMethods in org.antlr.grammar.v3 that return Token Modifier and Type Method Description private TokenANTLRParser. LT(int k)TokenActionAnalysis. nextToken()TokenActionTranslator. nextToken()TokenANTLRLexer. nextToken()Methods in org.antlr.grammar.v3 with parameters of type Token Modifier and Type Method Description java.lang.ObjectANTLRParser.grammar_Adaptor. create(Token payload)java.lang.ObjectANTLRParser.grammar_Adaptor. errorNode(TokenStream input, Token start, Token stop, RecognitionException e)Constructors in org.antlr.grammar.v3 with parameters of type Token Constructor Description ActionTranslator(CodeGenerator generator, java.lang.String ruleName, Token actionToken, int outerAltNum)GrammarASTErrorNode(TokenStream input, Token start, Token stop, RecognitionException e) -
Uses of Token in org.antlr.runtime
Classes in org.antlr.runtime that implement Token Modifier and Type Class Description classClassicTokenA Token object like we'd use in ANTLR 2.x; has an actual string created and associated with this object.classCommonTokenFields in org.antlr.runtime declared as Token Modifier and Type Field Description static TokenToken. EOF_TOKENstatic TokenToken. INVALID_TOKENstatic TokenToken. SKIP_TOKENIn an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR will avoid creating a token for this symbol and try to fetch another.TokenParserRuleReturnScope. startTokenParserRuleReturnScope. stopTokenRecognitionException. tokenThe current Token when an error occurred.TokenRecognizerSharedState. tokenThe goal of all lexer rules/methods is to create a token object.Fields in org.antlr.runtime with type parameters of type Token Modifier and Type Field Description protected java.util.List<Token>BufferedTokenStream. tokensRecord every single token pulled from the source so we can reproduce chunks of it later.protected java.util.List<Token>LegacyCommonTokenStream. tokensRecord every single token pulled from the source so we can reproduce chunks of it later.Methods in org.antlr.runtime that return Token Modifier and Type Method Description TokenLexer. emit()The standard method called to automatically emit a token at the outermost lexical rule.TokenBufferedTokenStream. get(int i)TokenLegacyCommonTokenStream. get(int i)Return absolute token i; ignore which channel the tokens are on; that is, count all tokens not just on-channel tokens.TokenTokenStream. get(int i)Get a token at an absolute index i; 0..n-1.TokenUnbufferedTokenStream. get(int i)TokenLexer. getEOFToken()Returns the EOF token (default), if you need to return a custom token instead override this method.TokenUnwantedTokenException. getUnexpectedToken()protected TokenBufferedTokenStream. LB(int k)protected TokenCommonTokenStream. LB(int k)protected TokenLegacyCommonTokenStream. LB(int k)Look backwards k tokens on-channel tokensTokenBufferedTokenStream. LT(int k)TokenCommonTokenStream. LT(int k)TokenLegacyCommonTokenStream. LT(int k)Get the ith token from the current position 1..n where k=1 is the first symbol of lookahead.TokenTokenStream. LT(int k)Get Token at current input pointer + i ahead where i=1 is next Token.TokenUnbufferedTokenStream. nextElement()TokenLexer. nextToken()Return a token from this source; i.e., match a token on the char stream.TokenTokenSource. nextToken()Return a Token object from your input stream (usually a CharStream).Methods in org.antlr.runtime that return types with arguments of type Token Modifier and Type Method Description java.util.List<? extends Token>BufferedTokenStream. get(int start, int stop)Get all tokens from start..stop inclusivelyjava.util.List<? extends Token>LegacyCommonTokenStream. get(int start, int stop)Get all tokens from start..stop inclusivelyjava.util.List<? extends Token>BufferedTokenStream. getTokens()java.util.List<? extends Token>BufferedTokenStream. getTokens(int start, int stop)java.util.List<? extends Token>BufferedTokenStream. getTokens(int start, int stop, int ttype)java.util.List<? extends Token>BufferedTokenStream. getTokens(int start, int stop, java.util.List<java.lang.Integer> types)java.util.List<? extends Token>BufferedTokenStream. getTokens(int start, int stop, BitSet types)Given a start and stop index, return a List of all tokens in the token type BitSet.java.util.List<? extends Token>LegacyCommonTokenStream. getTokens()java.util.List<? extends Token>LegacyCommonTokenStream. getTokens(int start, int stop)java.util.List<? extends Token>LegacyCommonTokenStream. getTokens(int start, int stop, int ttype)java.util.List<? extends Token>LegacyCommonTokenStream. getTokens(int start, int stop, java.util.List<java.lang.Integer> types)java.util.List<? extends Token>LegacyCommonTokenStream. getTokens(int start, int stop, BitSet types)Given a start and stop index, return a List of all tokens in the token type BitSet.Methods in org.antlr.runtime with parameters of type Token Modifier and Type Method Description voidTokenRewriteStream. delete(java.lang.String programName, Token from, Token to)voidTokenRewriteStream. delete(Token indexT)voidTokenRewriteStream. delete(Token from, Token to)voidLexer. emit(Token token)Currently does not support multiple emits per nextToken invocation for efficiency reasons.java.lang.StringBaseRecognizer. 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.voidTokenRewriteStream. insertAfter(java.lang.String programName, Token t, java.lang.Object text)voidTokenRewriteStream. insertAfter(Token t, java.lang.Object text)voidTokenRewriteStream. insertBefore(java.lang.String programName, Token t, java.lang.Object text)voidTokenRewriteStream. insertBefore(Token t, java.lang.Object text)booleanUnbufferedTokenStream. isEOF(Token o)voidTokenRewriteStream. replace(java.lang.String programName, Token from, Token to, java.lang.Object text)voidTokenRewriteStream. replace(Token indexT, java.lang.Object text)voidTokenRewriteStream. replace(Token from, Token to, java.lang.Object text)java.lang.StringBufferedTokenStream. toString(Token start, Token stop)java.lang.StringLegacyCommonTokenStream. toString(Token start, Token stop)java.lang.StringTokenStream. toString(Token start, Token stop)Because the user is not required to use a token with an index stored in it, we must provide a means for two token objects themselves to indicate the start/end location.java.lang.StringUnbufferedTokenStream. toString(Token start, Token stop)Method parameters in org.antlr.runtime with type arguments of type Token Modifier and Type Method Description java.util.List<java.lang.String>BaseRecognizer. toStrings(java.util.List<? extends Token> tokens)A convenience method for use most often with template rewrites.Constructors in org.antlr.runtime with parameters of type Token Constructor Description ClassicToken(Token oldToken)CommonToken(Token oldToken) -
Uses of Token in org.antlr.runtime.debug
Classes in org.antlr.runtime.debug that implement Token Modifier and Type Class Description static classRemoteDebugEventSocketListener.ProxyTokenFields in org.antlr.runtime.debug declared as Token Modifier and Type Field Description protected TokenProfiler. lastRealTokenTouchedInDecisionFields in org.antlr.runtime.debug with type parameters of type Token Modifier and Type Field Description (package private) java.util.List<Token>ParseTreeBuilder. hiddenTokensMethods in org.antlr.runtime.debug that return Token Modifier and Type Method Description TokenDebugTokenStream. get(int i)TokenDebugTreeAdaptor. getToken(java.lang.Object t)TokenDebugTokenStream. LT(int i)Methods in org.antlr.runtime.debug with parameters of type Token Modifier and Type Method Description voidDebugTreeAdaptor. addChild(java.lang.Object t, Token child)java.lang.ObjectDebugTreeAdaptor. becomeRoot(Token newRoot, java.lang.Object oldRoot)voidBlankDebugEventListener. consumeHiddenToken(Token token)voidDebugEventHub. consumeHiddenToken(Token token)voidDebugEventListener. consumeHiddenToken(Token t)An off-channel input token was consumed.voidDebugEventRepeater. consumeHiddenToken(Token token)voidDebugEventSocketProxy. consumeHiddenToken(Token t)voidParseTreeBuilder. consumeHiddenToken(Token token)voidProfiler. consumeHiddenToken(Token token)voidBlankDebugEventListener. consumeToken(Token token)voidDebugEventHub. consumeToken(Token token)voidDebugEventListener. consumeToken(Token t)An input token was consumed; matched by any kind of element.voidDebugEventRepeater. consumeToken(Token token)voidDebugEventSocketProxy. consumeToken(Token t)voidParseTreeBuilder. consumeToken(Token token)voidProfiler. consumeToken(Token token)java.lang.ObjectDebugTreeAdaptor. create(int tokenType, Token fromToken)java.lang.ObjectDebugTreeAdaptor. create(int tokenType, Token fromToken, java.lang.String text)java.lang.ObjectDebugTreeAdaptor. create(Token payload)voidBlankDebugEventListener. createNode(java.lang.Object node, Token token)voidDebugEventHub. createNode(java.lang.Object node, Token token)voidDebugEventListener. createNode(java.lang.Object node, Token token)Announce a new node built from an existing token.voidDebugEventRepeater. createNode(java.lang.Object node, Token token)voidDebugEventSocketProxy. createNode(java.lang.Object node, Token token)voidTraceDebugEventListener. createNode(java.lang.Object node, Token token)java.lang.ObjectDebugTreeAdaptor. errorNode(TokenStream input, Token start, Token stop, RecognitionException e)voidBlankDebugEventListener. LT(int i, Token t)voidDebugEventHub. LT(int index, Token t)voidDebugEventListener. LT(int i, Token t)Somebody (anybody) looked ahead.voidDebugEventRepeater. LT(int i, Token t)voidDebugEventSocketProxy. LT(int i, Token t)voidProfiler. LT(int i, Token t)Track refs to lookahead if in a fixed/nonfixed decision.protected java.lang.StringDebugEventSocketProxy. serializeToken(Token t)voidDebugTreeAdaptor. setTokenBoundaries(java.lang.Object t, Token startToken, Token stopToken)java.lang.StringDebugTokenStream. toString(Token start, Token stop) -
Uses of Token in org.antlr.runtime.tree
Fields in org.antlr.runtime.tree declared as Token Modifier and Type Field Description TokenCommonErrorNode. startTokenCommonErrorNode. stopTokenCommonTree. tokenA single token is the payloadFields in org.antlr.runtime.tree with type parameters of type Token Modifier and Type Field Description java.util.List<Token>ParseTree. hiddenTokensMethods in org.antlr.runtime.tree that return Token Modifier and Type Method Description abstract TokenBaseTreeAdaptor. createToken(int tokenType, java.lang.String text)Tell me how to create a token for use with imaginary token nodes.abstract TokenBaseTreeAdaptor. createToken(Token fromToken)Tell me how to create a token for use with imaginary token nodes.TokenCommonTreeAdaptor. createToken(int tokenType, java.lang.String text)Tell me how to create a token for use with imaginary token nodes.TokenCommonTreeAdaptor. createToken(Token fromToken)Tell me how to create a token for use with imaginary token nodes.TokenCommonTree. getToken()TokenCommonTreeAdaptor. getToken(java.lang.Object t)What is the Token associated with this node? If you are not using CommonTree, then you must override this in your own adaptor.TokenTreeAdaptor. getToken(java.lang.Object t)Return the token object from which this node was created.TokenRewriteRuleTokenStream. nextToken()Methods in org.antlr.runtime.tree with parameters of type Token Modifier and Type Method Description java.lang.ObjectBaseTreeAdaptor. becomeRoot(Token newRoot, java.lang.Object oldRoot)java.lang.ObjectTreeAdaptor. becomeRoot(Token newRoot, java.lang.Object oldRoot)Create a node for newRoot make it the root of oldRoot.java.lang.ObjectBaseTreeAdaptor. create(int tokenType, Token fromToken)java.lang.ObjectBaseTreeAdaptor. create(int tokenType, Token fromToken, java.lang.String text)java.lang.ObjectCommonTreeAdaptor. create(Token payload)java.lang.ObjectTreeAdaptor. create(int tokenType, Token fromToken)Create a new node derived from a token, with a new token type.java.lang.ObjectTreeAdaptor. create(int tokenType, Token fromToken, java.lang.String text)Same as create(tokenType,fromToken) except set the text too.java.lang.ObjectTreeAdaptor. create(Token payload)Create a tree node from Token object; for CommonTree type trees, then the token just becomes the payload.java.lang.ObjectTreeWizard.TreePatternTreeAdaptor. create(Token payload)abstract TokenBaseTreeAdaptor. createToken(Token fromToken)Tell me how to create a token for use with imaginary token nodes.TokenCommonTreeAdaptor. createToken(Token fromToken)Tell me how to create a token for use with imaginary token nodes.java.lang.ObjectBaseTreeAdaptor. errorNode(TokenStream input, Token start, Token stop, RecognitionException e)create tree node that holds the start and stop tokens associated with an error.java.lang.ObjectTreeAdaptor. errorNode(TokenStream input, Token start, Token stop, RecognitionException e)Return a tree node representing an error.voidCommonTreeAdaptor. setTokenBoundaries(java.lang.Object t, Token startToken, Token stopToken)Track start/stop token for subtree root created for a rule.voidTreeAdaptor. setTokenBoundaries(java.lang.Object t, Token startToken, Token stopToken)Where are the bounds in the input token stream for this node and all children? Each rule that creates AST nodes will call this method right before returning.Constructors in org.antlr.runtime.tree with parameters of type Token Constructor Description CommonErrorNode(TokenStream input, Token start, Token stop, RecognitionException e)CommonTree(Token t)TreePattern(Token payload)WildcardTreePattern(Token payload) -
Uses of Token in org.antlr.tool
Fields in org.antlr.tool declared as Token Modifier and Type Field Description TokenAttributeScope. derivedFromTokenThis scope is associated with which input token (for error handling)?TokenGrammar.LabelElementPair. labelTokenGrammarSemanticsMessage. offendingTokenMost of the time, we'll have a token such as an undefined rule ref and so this will be set.TokenGrammarSyntaxMessage. offendingTokenMost of the time, we'll have a token and so this will be set.Fields in org.antlr.tool with type parameters of type Token Modifier and Type Field Description java.util.Map<java.lang.Integer,java.util.Set<Token>>GrammarInsufficientPredicatesMessage. altToLocationsprotected java.util.Set<Token>Grammar. tokenIDRefsThe unique set of all token ID references in any ruleMethods in org.antlr.tool that return Token Modifier and Type Method Description TokenInterpreter. nextToken()Methods in org.antlr.tool with parameters of type Token Modifier and Type Method Description protected voidNameSpaceChecker. checkForLabelConflict(Rule r, Token label)Make sure a label doesn't conflict with another symbol.booleanNameSpaceChecker. checkForLabelTypeMismatch(Rule r, Token label, int type)If type of previous label differs from new label's type, that's an error.AttributeScopeGrammar. createParameterScope(java.lang.String ruleName, Token argAction)AttributeScopeGrammar. createReturnScope(java.lang.String ruleName, Token retAction)AttributeScopeGrammar. createRuleScope(java.lang.String ruleName, Token scopeAction)AttributeScopeGrammar. defineGlobalScope(java.lang.String name, Token scopeAction)protected voidGrammar. defineLabel(Rule r, Token label, GrammarAST element, int type)Define a label defined in a rule r; check the validity then ask the Rule object to actually define it.voidRule. defineLabel(Token label, GrammarAST elementRef, int type)voidGrammar. defineLexerRuleFoundInParser(Token ruleToken, GrammarAST ruleAST)voidGrammar. defineRule(Token ruleToken, java.lang.String modifier, java.util.Map<java.lang.String,java.lang.Object> options, GrammarAST tree, GrammarAST argActionAST, int numAlts)Define a new rule.voidGrammar. defineRuleListLabel(java.lang.String ruleName, Token label, GrammarAST element)voidGrammar. defineRuleRefLabel(java.lang.String ruleName, Token label, GrammarAST ruleRef)voidGrammar. defineTokenListLabel(java.lang.String ruleName, Token label, GrammarAST element)voidGrammar. defineTokenRefLabel(java.lang.String ruleName, Token label, GrammarAST tokenRef)voidGrammar. defineWildcardTreeLabel(java.lang.String ruleName, Token label, GrammarAST tokenRef)voidGrammar. defineWildcardTreeListLabel(java.lang.String ruleName, Token label, GrammarAST tokenRef)java.util.Collection<java.lang.String>LeftRecursiveRuleAnalyzer. getNamesFromArgAction(Token t)static voidErrorManager. grammarError(int msgID, Grammar g, Token token)static voidErrorManager. grammarError(int msgID, Grammar g, Token token, java.lang.Object arg)static voidErrorManager. grammarError(int msgID, Grammar g, Token token, java.lang.Object arg, java.lang.Object arg2)static voidErrorManager. grammarWarning(int msgID, Grammar g, Token token)static voidErrorManager. grammarWarning(int msgID, Grammar g, Token token, java.lang.Object arg)static voidErrorManager. grammarWarning(int msgID, Grammar g, Token token, java.lang.Object arg, java.lang.Object arg2)voidGrammarAST. initialize(Token token)java.lang.StringGrammar. setOption(java.lang.String key, java.lang.Object value, Token optionsStartToken)Save the option key/value pair and process it; return the key or null if invalid option.java.lang.StringRule. setOption(java.lang.String key, java.lang.Object value, Token optionsStartToken)Save the option key/value pair and process it; return the key or null if invalid option.voidGrammar. setOptions(java.util.Map<java.lang.String,java.lang.Object> options, Token optionsStartToken)voidRule. setOptions(java.util.Map<java.lang.String,java.lang.Object> options, Token optionsStartToken)voidGrammarAST. setTokenBoundaries(Token startToken, Token stopToken)Track start/stop token for subtree root created for a rule.static voidErrorManager. syntaxError(int msgID, Grammar grammar, Token token, java.lang.Object arg, RecognitionException re)Method parameters in org.antlr.tool with type arguments of type Token Modifier and Type Method Description static voidErrorManager. insufficientPredicates(DecisionProbe probe, DFAState d, java.util.Map<java.lang.Integer,java.util.Set<Token>> altToUncoveredLocations)Constructors in org.antlr.tool with parameters of type Token Constructor Description AttributeScope(java.lang.String name, Token derivedFromToken)AttributeScope(Grammar grammar, java.lang.String name, Token derivedFromToken)GrammarAST(Token token)GrammarSemanticsMessage(int msgID, Grammar g, Token offendingToken)GrammarSemanticsMessage(int msgID, Grammar g, Token offendingToken, java.lang.Object arg)GrammarSemanticsMessage(int msgID, Grammar g, Token offendingToken, java.lang.Object arg, java.lang.Object arg2)GrammarSyntaxMessage(int msgID, Grammar grammar, Token offendingToken, java.lang.Object arg, RecognitionException exception)GrammarSyntaxMessage(int msgID, Grammar grammar, Token offendingToken, RecognitionException exception)LabelElementPair(Token label, GrammarAST elementRef)RuleLabelScope(Rule referencedRule, Token actionToken)Constructor parameters in org.antlr.tool with type arguments of type Token Constructor Description GrammarInsufficientPredicatesMessage(DecisionProbe probe, DFAState problemState, java.util.Map<java.lang.Integer,java.util.Set<Token>> altToLocations)
-