Uses of Class
org.antlr.tool.Rule
Packages that use Rule
Package
Description
-
Uses of Rule in org.antlr
Modifier and TypeMethodDescriptionprotected void
Tool.writeDOTFile
(Grammar g, Rule r, String dot) -
Uses of Rule in org.antlr.analysis
Fields in org.antlr.analysis declared as RuleModifier and TypeFieldDescriptionNFAState.enclosingRule
What rule do we live in?RuleClosureTransition.rule
Ptr to the rule definition object for this rule refFields in org.antlr.analysis with type parameters of type RuleMethods in org.antlr.analysis with parameters of type RuleModifier and TypeMethodDescriptionprotected int
LL1Analyzer._detectConfoundingPredicates
(NFAState s, Rule enclosingRule, boolean chaseFollowTransitions) Constructors in org.antlr.analysis with parameters of type RuleModifierConstructorDescriptionRuleClosureTransition
(Rule rule, NFAState ruleStart, NFAState followState) -
Uses of Rule in org.antlr.codegen
Methods in org.antlr.codegen with parameters of type RuleModifier and TypeMethodDescriptionvoid
CodeGenerator.issueInvalidAttributeError
(String x, String y, Rule enclosingRule, antlr.Token actionToken, int outerAltNum) void
CodeGenerator.issueInvalidAttributeError
(String x, Rule enclosingRule, antlr.Token actionToken, int outerAltNum) void
CodeGenerator.issueInvalidScopeError
(String x, String y, Rule enclosingRule, antlr.Token actionToken, int outerAltNum) void
CodeGenerator.translateActionAttributeReferencesForSingleScope
(Rule r, Map scopeActions) Use for translating rule @init{...} actions that have no scope -
Uses of Rule in org.antlr.grammar.v2
Methods in org.antlr.grammar.v2 with parameters of type RuleModifier and TypeMethodDescriptionfinal void
DefineGrammarItemsWalker.ruleAction
(antlr.collections.AST _t, Rule r) final void
DefineGrammarItemsWalker.ruleScopeSpec
(antlr.collections.AST _t, Rule r) -
Uses of Rule in org.antlr.grammar.v3
Fields in org.antlr.grammar.v3 declared as RuleModifier and TypeFieldDescription(package private) Rule
ActionAnalysis.enclosingRule
(package private) Rule
ActionTranslator.enclosingRule
-
Uses of Rule in org.antlr.tool
Fields in org.antlr.tool declared as RuleModifier and TypeFieldDescription(package private) Rule
NFAFactory.currentRule
RuleLabelScope.referencedRule
Fields in org.antlr.tool with type parameters of type RuleModifier and TypeFieldDescriptionGrammar.delegatedRuleReferences
The list of all rules referenced in this grammar, not defined here, and defined in a delegate grammar.Grammar.leftRecursiveRules
A list of all rules that are in any left-recursive cycle.protected LinkedHashMap<String,
Rule> Grammar.nameToRuleMap
Map a rule to it's Rule objectCompositeGrammar.ruleIndexToRuleList
Map a rule index to its name; use a Vector on purpose as new collections stuff won't let me setSize and make it grow.GrammarSanity.visitedDuringRecursionCheck
The checkForLeftRecursion method needs to track what rules it has visited to track infinite recursion.Methods in org.antlr.tool that return RuleModifier and TypeMethodDescriptionNFAFactory.getCurrentRule()
Grammar.getLocallyDefinedRule
(String ruleName) Grammar.LabelElementPair.getReferencedRule()
Find a rule by looking in current grammar then down towards the delegate grammars.Methods in org.antlr.tool that return types with arguments of type RuleModifier and TypeMethodDescriptionGrammarSanity.checkAllRulesForLeftRecursion()
Check all rules for infinite left recursion before analysis.CompositeGrammar.getAllImportedRules
(Grammar g) Get all rule definitions from all direct/indirect delegate grammars of g.Grammar.getAllImportedRules()
Get set of all rules imported from all delegate grammars even if indirectly delegated.Grammar.getDelegatedRuleReferences()
CompositeGrammar.getDelegatedRules
(Grammar g) Get set of rules for grammar g that need to have manual delegation methods.Grammar.getDelegatedRules()
Get the set of Rules that need to have manual delegations like "void rule() { importedGrammar.rule(); }" If this grammar is master, get list of all rule definitions from all delegate grammars.Grammar.getLeftRecursiveRules()
Return a list of left-recursive rules; no analysis can be done successfully on these.Grammar.getRules()
Methods in org.antlr.tool with parameters of type RuleModifier and TypeMethodDescriptionprotected void
GrammarSanity.addRulesToCycle
(Rule targetRule, Rule enclosingRule, List<Set<Rule>> listOfRecursiveCycles) enclosingRuleName calls targetRuleName, find the cycle containing the target and add the caller.NFAFactory.build_RuleRef
(Rule refDef, NFAState ruleStart) For reference to rule r, build o-e->(r) o where (r) is the start of rule r and the trailing o is not linked to from rule ref state directly (it's done thru the transition(0) RuleClosureTransition.protected void
NameSpaceChecker.checkForLabelConflict
(Rule r, antlr.Token label) Make sure a label doesn't conflict with another symbol.boolean
NameSpaceChecker.checkForLabelTypeMismatch
(Rule r, antlr.Token label, int type) If type of previous label differs from new label's type, that's an error.protected void
NameSpaceChecker.checkForRuleArgumentAndReturnValueConflicts
(Rule r) protected void
NameSpaceChecker.checkForRuleDefinitionProblems
(Rule r) void
NameSpaceChecker.checkForRuleScopeAttributeConflict
(Rule r, Attribute attribute) Check for collision of a rule-scope dynamic attribute with: arg, return value, rule name itself.protected void
Grammar.defineLabel
(Rule r, antlr.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.void
NFAFactory.setCurrentRule
(Rule currentRule) Method parameters in org.antlr.tool with type arguments of type RuleModifier and TypeMethodDescriptionprotected void
GrammarSanity.addRulesToCycle
(Rule targetRule, Rule enclosingRule, List<Set<Rule>> listOfRecursiveCycles) enclosingRuleName calls targetRuleName, find the cycle containing the target and add the caller.protected boolean
GrammarSanity.traceStatesLookingForLeftRecursion
(NFAState s, Set visitedStates, List<Set<Rule>> listOfRecursiveCycles) From state s, look for any transition to a rule that is currently being traced.Constructors in org.antlr.tool with parameters of type Rule