Uses of Class
org.antlr.v4.runtime.ParserRuleContext
Packages that use ParserRuleContext
Package
Description
-
Uses of ParserRuleContext in org.antlr.v4.runtime
Subclasses of ParserRuleContext in org.antlr.v4.runtimeModifier and TypeClassDescriptionclassThis class extendsParserRuleContextby allowing the value ofInterpreterRuleContext.getRuleIndex()to be explicitly set for the context.classA handy class for use with options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;} that provides a backing field / impl for the outer alternative number matched for an internal parse tree node.Fields in org.antlr.v4.runtime declared as ParserRuleContextModifier and TypeFieldDescriptionprotected ParserRuleContextParser._ctxTheParserRuleContextobject for the currently executing rule.private static final ParserRuleContextParserRuleContext.EMPTYprotected ParserRuleContextDefaultErrorStrategy.nextTokensContextThis field is used to propagate information about the lookahead following the previous match.Fields in org.antlr.v4.runtime with type parameters of type ParserRuleContextModifier and TypeFieldDescriptionprotected final Deque<Tuple2<ParserRuleContext,Integer>> ParserInterpreter._parentContextStackThis stack corresponds to the _parentctx, _parentState pair of locals that would exist on call stack frames with a recursive descent parser; in the generated function for a left-recursive rule you'd see: private EContext e(int _p) throws RecognitionException { ParserRuleContext _parentctx = _ctx; // Pair.a int _parentState = getState(); // Pair.b ...Methods in org.antlr.v4.runtime with type parameters of type ParserRuleContextModifier and TypeMethodDescription<T extends ParserRuleContext>
TParserRuleContext.getRuleContext(Class<? extends T> ctxType, int i) <T extends ParserRuleContext>
List<? extends T>ParserRuleContext.getRuleContexts(Class<? extends T> ctxType) Methods in org.antlr.v4.runtime that return ParserRuleContextModifier and TypeMethodDescriptionstatic ParserRuleContextParserRuleContext.emptyContext()Parser.getContext()Parser.getInvokingContext(int ruleIndex) ParserRuleContext.getParent()Parser.getRuleContext()ParserInterpreter.parse(int startRuleIndex) Begin parsing at startRuleIndexMethods in org.antlr.v4.runtime with parameters of type ParserRuleContextModifier and TypeMethodDescriptionvoidParserRuleContext.copyFrom(ParserRuleContext ctx) COPY a ctx (I'm deliberately not using copy constructor) to avoid confusion with creating node with parent.Parser.createErrorNode(ParserRuleContext parent, Token t) How to create an error node, given a token, associated with a parent.protected InterpreterRuleContextParserInterpreter.createInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex) Provide simple "factory" for InterpreterRuleContext's.Parser.createTerminalNode(ParserRuleContext parent, Token t) How to create a token leaf node associated with a parent.voidParser.TraceListener.enterEveryRule(ParserRuleContext ctx) voidParser.TrimToSizeListener.enterEveryRule(ParserRuleContext ctx) voidParser.enterLeftFactoredRule(ParserRuleContext localctx, int state, int ruleIndex) voidParser.enterOuterAlt(ParserRuleContext localctx, int altNum) voidParser.enterRecursionRule(ParserRuleContext localctx, int ruleIndex) Deprecated.voidParser.enterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence) voidParserInterpreter.enterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence) voidParser.enterRule(ParserRuleContext localctx, int state, int ruleIndex) Always called by generated parsers upon entry to a rule.voidParser.TraceListener.exitEveryRule(ParserRuleContext ctx) voidParser.TrimToSizeListener.exitEveryRule(ParserRuleContext ctx) voidParser.pushNewRecursionContext(ParserRuleContext localctx, int state, int ruleIndex) LikeParser.enterRule(org.antlr.v4.runtime.ParserRuleContext, int, int)but for recursive rules.voidParser.setContext(ParserRuleContext ctx) voidParser.unrollRecursionContexts(ParserRuleContext _parentctx) Constructors in org.antlr.v4.runtime with parameters of type ParserRuleContextModifierConstructorDescriptionInputMismatchException(Parser recognizer, int state, ParserRuleContext ctx) InterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex) Constructs a newInterpreterRuleContextwith the specified parent, invoking state, and rule index.NoViableAltException(Recognizer<Token, ?> recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx) ParserRuleContext(ParserRuleContext parent, int invokingStateNumber) RecognitionException(String message, Recognizer<Token, ?> recognizer, IntStream input, ParserRuleContext ctx) RecognitionException(Recognizer<Token, ?> recognizer, IntStream input, ParserRuleContext ctx) RuleContextWithAltNum(ParserRuleContext parent, int invokingStateNumber) -
Uses of ParserRuleContext in org.antlr.v4.runtime.atn
Fields in org.antlr.v4.runtime.atn declared as ParserRuleContextModifier and TypeFieldDescriptionfinal ParserRuleContextSimulatorState.outerContextfinal ParserRuleContextSimulatorState.remainingOuterContextMethods in org.antlr.v4.runtime.atn that return ParserRuleContextModifier and TypeMethodDescriptionprotected final ParserRuleContextParserATNSimulator.skipTailCalls(ParserRuleContext context) Methods in org.antlr.v4.runtime.atn that return types with arguments of type ParserRuleContextModifier and TypeMethodDescriptionprotected Tuple2<DFAState,ParserRuleContext> ParserATNSimulator.computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) Compute a target state for an edge in the DFA, and attempt to add the computed state and corresponding edge to the DFA.protected Tuple2<DFAState,ParserRuleContext> ProfilingATNSimulator.computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) (package private) Tuple2<DFAState,ParserRuleContext> ReachComputation.computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) Compute a target state for an edge in the DFA, and attempt to add the computed state and corresponding edge to the DFA.private Tuple2<DFAState,ParserRuleContext> ReachComputation.finishTargetEdge(DFA dfa, DFAState s, int t, IntegerList contextElements, ATNConfigSet edgeConfigs, ParserRuleContext remainingGlobalContext, PredictionContextCache contextCache) Install a DFA edge for the computed config set, orATNSimulator.ERRORif empty.Methods in org.antlr.v4.runtime.atn with parameters of type ParserRuleContextModifier and TypeMethodDescriptionintParserATNSimulator.adaptivePredict(TokenStream input, int decision, ParserRuleContext outerContext) intParserATNSimulator.adaptivePredict(TokenStream input, int decision, ParserRuleContext outerContext, boolean useContext) intProfilingATNSimulator.adaptivePredict(TokenStream input, int decision, ParserRuleContext outerContext) protected ATNConfigSetParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs, ParserRuleContext globalContext, PredictionContextCache contextCache) This method transforms the start state computed byParserATNSimulator.computeStartState(org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.ParserRuleContext, boolean)to the special start state used by a precedence DFA for a particular precedence value.protected SimulatorStateParserATNSimulator.computeStartState(DFA dfa, ParserRuleContext globalContext, boolean useContext) protected SimulatorStateProfilingATNSimulator.computeStartState(DFA dfa, ParserRuleContext globalContext, boolean useContext) protected Tuple2<DFAState,ParserRuleContext> ParserATNSimulator.computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) Compute a target state for an edge in the DFA, and attempt to add the computed state and corresponding edge to the DFA.protected Tuple2<DFAState,ParserRuleContext> ProfilingATNSimulator.computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) (package private) Tuple2<DFAState,ParserRuleContext> ReachComputation.computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) Compute a target state for an edge in the DFA, and attempt to add the computed state and corresponding edge to the DFA.protected booleanParserATNSimulator.evalSemanticContext(SemanticContext pred, ParserRuleContext parserCallStack, int alt) Evaluate a semantic context within a specific parser context.protected BitSetParserATNSimulator.evalSemanticContext(DFAState.PredPrediction[] predPredictions, ParserRuleContext outerContext, boolean complete) Look through a list of predicate/alt pairs, returning alts for the pairs that win.protected booleanProfilingATNSimulator.evalSemanticContext(SemanticContext pred, ParserRuleContext parserCallStack, int alt) private intParserATNSimulator.execDFA(DFA dfa, TokenStream input, int startIndex, ParserRuleContext outerContext, DFAState s0, boolean useContext, ParserRuleContext remainingOuterContext) DFA walk.private Tuple2<DFAState,ParserRuleContext> ReachComputation.finishTargetEdge(DFA dfa, DFAState s, int t, IntegerList contextElements, ATNConfigSet edgeConfigs, ParserRuleContext remainingGlobalContext, PredictionContextCache contextCache) Install a DFA edge for the computed config set, orATNSimulator.ERRORif empty.protected SimulatorStateParserATNSimulator.getStartState(DFA dfa, TokenStream input, ParserRuleContext outerContext, boolean useContext) Local- or full-context DFA start, ornullif it is not yet built.protected SimulatorStateProfilingATNSimulator.getStartState(DFA dfa, TokenStream input, ParserRuleContext outerContext, boolean useContext) protected NoViableAltExceptionParserATNSimulator.noViableAlt(TokenStream input, ParserRuleContext outerContext, ATNConfigSet configs, int startIndex) private static booleanParserATNSimulator.repeatedEof(ArrayList<DFAState> states, ArrayList<ParserRuleContext> contexts, DFAState state, ParserRuleContext ctx, boolean useContext) protected final ParserRuleContextParserATNSimulator.skipTailCalls(ParserRuleContext context) Constructors in org.antlr.v4.runtime.atn with parameters of type ParserRuleContextModifierConstructorDescriptionSimulatorState(ParserRuleContext outerContext, DFAState s0, boolean useContext, ParserRuleContext remainingOuterContext) -
Uses of ParserRuleContext in org.antlr.v4.runtime.tree
Methods in org.antlr.v4.runtime.tree that return ParserRuleContextModifier and TypeMethodDescriptionstatic ParserRuleContextTrees.getRootOfSubtreeEnclosingRegion(ParseTree t, int startTokenIndex, int stopTokenIndex) Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex inclusively using postorder traversal.Methods in org.antlr.v4.runtime.tree with parameters of type ParserRuleContextModifier and TypeMethodDescriptionvoidParseTreeListener.enterEveryRule(ParserRuleContext ctx) voidParseTreeListener.exitEveryRule(ParserRuleContext ctx) static voidTrees.stripChildrenOutOfRange(ParserRuleContext t, ParserRuleContext root, int startIndex, int stopIndex) Replace any subtree siblings of root that are completely to left or right of lookahead range with a CommonToken(Token.INVALID_TYPE,"...") node. -
Uses of ParserRuleContext in org.antlr.v4.test.runtime.java.api
Subclasses of ParserRuleContext in org.antlr.v4.test.runtime.java.apiModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classMethods in org.antlr.v4.test.runtime.java.api with parameters of type ParserRuleContextModifier and TypeMethodDescriptionvoidGroovyLikeBaseListener.enterEveryRule(ParserRuleContext ctx) voidJavaBaseListener.enterEveryRule(ParserRuleContext ctx) voidGroovyLikeBaseListener.exitEveryRule(ParserRuleContext ctx) voidJavaBaseListener.exitEveryRule(ParserRuleContext ctx) Constructors in org.antlr.v4.test.runtime.java.api with parameters of type ParserRuleContextModifierConstructorDescriptionAnnotationConstantRestContext(ParserRuleContext parent, int invokingState) AnnotationContext(ParserRuleContext parent, int invokingState) AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) AnnotationNameContext(ParserRuleContext parent, int invokingState) AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) ArgsContext(ParserRuleContext parent, int invokingState) ArgumentsContext(ParserRuleContext parent, int invokingState) ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) ArrayInitializerContext(ParserRuleContext parent, int invokingState) BlockContext(ParserRuleContext parent, int invokingState) BlockContext(ParserRuleContext parent, int invokingState) BlockStatementContext(ParserRuleContext parent, int invokingState) CatchClauseContext(ParserRuleContext parent, int invokingState) CatchTypeContext(ParserRuleContext parent, int invokingState) ClassBodyContext(ParserRuleContext parent, int invokingState) ClassBodyContext(ParserRuleContext parent, int invokingState) ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) ClassCreatorRestContext(ParserRuleContext parent, int invokingState) ClassDeclarationContext(ParserRuleContext parent, int invokingState) ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) ClosureContext(ParserRuleContext parent, int invokingState) CompilationUnitContext(ParserRuleContext parent, int invokingState) CompilationUnitContext(ParserRuleContext parent, int invokingState) ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) ConstantExpressionContext(ParserRuleContext parent, int invokingState) ConstDeclarationContext(ParserRuleContext parent, int invokingState) ConstructorBodyContext(ParserRuleContext parent, int invokingState) ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) CreatedNameContext(ParserRuleContext parent, int invokingState) CreatorContext(ParserRuleContext parent, int invokingState) DefaultValueContext(ParserRuleContext parent, int invokingState) ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) ElementValueContext(ParserRuleContext parent, int invokingState) ElementValuePairContext(ParserRuleContext parent, int invokingState) ElementValuePairsContext(ParserRuleContext parent, int invokingState) EnhancedForControlContext(ParserRuleContext parent, int invokingState) EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) EnumConstantContext(ParserRuleContext parent, int invokingState) EnumConstantNameContext(ParserRuleContext parent, int invokingState) EnumConstantsContext(ParserRuleContext parent, int invokingState) EnumDeclarationContext(ParserRuleContext parent, int invokingState) ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) ExpressionContext(ParserRuleContext parent, int invokingState) ExpressionContext(ParserRuleContext parent, int invokingState) ExpressionListContext(ParserRuleContext parent, int invokingState) FieldDeclarationContext(ParserRuleContext parent, int invokingState) FieldDeclContext(ParserRuleContext parent, int invokingState) FinallyBlockContext(ParserRuleContext parent, int invokingState) ForControlContext(ParserRuleContext parent, int invokingState) ForInitContext(ParserRuleContext parent, int invokingState) FormalParameterContext(ParserRuleContext parent, int invokingState) FormalParameterListContext(ParserRuleContext parent, int invokingState) FormalParametersContext(ParserRuleContext parent, int invokingState) ForUpdateContext(ParserRuleContext parent, int invokingState) GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) ImportDeclarationContext(ParserRuleContext parent, int invokingState) InnerCreatorContext(ParserRuleContext parent, int invokingState) InterfaceBodyContext(ParserRuleContext parent, int invokingState) InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) LastFormalParameterContext(ParserRuleContext parent, int invokingState) LiteralContext(ParserRuleContext parent, int invokingState) LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) MemberContext(ParserRuleContext parent, int invokingState) MemberDeclarationContext(ParserRuleContext parent, int invokingState) MethodBodyContext(ParserRuleContext parent, int invokingState) MethodDeclarationContext(ParserRuleContext parent, int invokingState) MethodDeclContext(ParserRuleContext parent, int invokingState) ModifierContext(ParserRuleContext parent, int invokingState) NlsContext(ParserRuleContext parent, int invokingState) NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) PackageDeclarationContext(ParserRuleContext parent, int invokingState) PackageDeclContext(ParserRuleContext parent, int invokingState) ParamsContext(ParserRuleContext parent, int invokingState) ParExpressionContext(ParserRuleContext parent, int invokingState) PostfixContext(ParserRuleContext parent, int invokingState) PrimaryContext(ParserRuleContext parent, int invokingState) PrimaryContext(ParserRuleContext parent, int invokingState) PrimitiveTypeContext(ParserRuleContext parent, int invokingState) QualifiedNameContext(ParserRuleContext parent, int invokingState) QualifiedNameContext(ParserRuleContext parent, int invokingState) QualifiedNameListContext(ParserRuleContext parent, int invokingState) ResourceContext(ParserRuleContext parent, int invokingState) ResourcesContext(ParserRuleContext parent, int invokingState) ResourceSpecificationContext(ParserRuleContext parent, int invokingState) SepContext(ParserRuleContext parent, int invokingState) StatementContext(ParserRuleContext parent, int invokingState) StatementContext(ParserRuleContext parent, int invokingState) StatementExpressionContext(ParserRuleContext parent, int invokingState) SuperSuffixContext(ParserRuleContext parent, int invokingState) SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) SwitchLabelContext(ParserRuleContext parent, int invokingState) TypeArgumentContext(ParserRuleContext parent, int invokingState) TypeArgumentsContext(ParserRuleContext parent, int invokingState) TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) TypeBoundContext(ParserRuleContext parent, int invokingState) TypeContext(ParserRuleContext parent, int invokingState) TypeDeclarationContext(ParserRuleContext parent, int invokingState) TypeDeclContext(ParserRuleContext parent, int invokingState) TypeListContext(ParserRuleContext parent, int invokingState) TypeParameterContext(ParserRuleContext parent, int invokingState) TypeParametersContext(ParserRuleContext parent, int invokingState) VariableDeclaratorContext(ParserRuleContext parent, int invokingState) VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) VariableInitializerContext(ParserRuleContext parent, int invokingState) VariableModifierContext(ParserRuleContext parent, int invokingState) -
Uses of ParserRuleContext in org.antlr.v4.test.runtime.java.api.perf
Subclasses of ParserRuleContext in org.antlr.v4.test.runtime.java.api.perfModifier and TypeClassDescriptionstatic classstatic classstatic classMethods in org.antlr.v4.test.runtime.java.api.perf with parameters of type ParserRuleContextModifier and TypeMethodDescriptionvoidgraphemesBaseListener.enterEveryRule(ParserRuleContext ctx) voidgraphemesBaseListener.exitEveryRule(ParserRuleContext ctx) Constructors in org.antlr.v4.test.runtime.java.api.perf with parameters of type ParserRuleContextModifierConstructorDescriptionEmoji_sequenceContext(ParserRuleContext parent, int invokingState) Grapheme_clusterContext(ParserRuleContext parent, int invokingState) GraphemesContext(ParserRuleContext parent, int invokingState) -
Uses of ParserRuleContext in org.antlr.v4.tool
Subclasses of ParserRuleContext in org.antlr.v4.toolModifier and TypeClassDescriptionclassAnInterpreterRuleContextthat knows which alternative for a rule was matched.Methods in org.antlr.v4.tool that return types with arguments of type ParserRuleContextModifier and TypeMethodDescriptionstatic List<ParserRuleContext>GrammarParserInterpreter.getAllPossibleParseTrees(Grammar g, Parser originalParser, TokenStream tokens, int decision, BitSet alts, int startIndex, int stopIndex, int startRuleIndex) Given an ambiguous parse information, return the list of ambiguous parse trees.static List<ParserRuleContext>GrammarParserInterpreter.getLookaheadParseTrees(Grammar g, ParserInterpreter originalParser, TokenStream tokens, int startRuleIndex, int decision, int startIndex, int stopIndex) Return a list of parse trees, one for each alternative in a decision given the same input.Methods in org.antlr.v4.tool with parameters of type ParserRuleContextModifier and TypeMethodDescriptionprotected InterpreterRuleContextGrammarParserInterpreter.createInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex) Constructors in org.antlr.v4.tool with parameters of type ParserRuleContextModifierConstructorDescriptionGrammarInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex)
Parser.enterRecursionRule(ParserRuleContext, int, int, int)instead.