Package | Description |
---|---|
org.antlr | |
org.antlr.analysis | |
org.antlr.codegen | |
org.antlr.grammar.v3 | |
org.antlr.tool |
Modifier and Type | Method | Description |
---|---|---|
protected void |
Tool.writeDOTFile(Grammar g,
Rule r,
String dot) |
Modifier and Type | Field | Description |
---|---|---|
Rule |
NFAState.enclosingRule |
What rule do we live in?
|
Rule |
RuleClosureTransition.rule |
Ptr to the rule definition object for this rule ref
|
Modifier and Type | Field | Description |
---|---|---|
Map<Rule,LookaheadSet> |
LL1Analyzer.FOLLOWCache |
Modifier and Type | Method | Description |
---|---|---|
protected int |
LL1Analyzer._detectConfoundingPredicates(NFAState s,
Rule enclosingRule,
boolean chaseFollowTransitions) |
|
LookaheadSet |
LL1Analyzer.FOLLOW(Rule r) |
Constructor | Description |
---|---|
RuleClosureTransition(Rule rule,
NFAState ruleStart,
NFAState followState) |
Modifier and Type | Method | Description |
---|---|---|
void |
CodeGenerator.issueInvalidAttributeError(String x,
String y,
Rule enclosingRule,
org.antlr.runtime.Token actionToken,
int outerAltNum) |
|
void |
CodeGenerator.issueInvalidAttributeError(String x,
Rule enclosingRule,
org.antlr.runtime.Token actionToken,
int outerAltNum) |
|
void |
CodeGenerator.issueInvalidScopeError(String x,
String y,
Rule enclosingRule,
org.antlr.runtime.Token actionToken,
int outerAltNum) |
|
void |
CodeGenerator.translateActionAttributeReferencesForSingleScope(Rule r,
Map<String,Object> scopeActions) |
Use for translating rule @init{...} actions that have no scope
|
Modifier and Type | Method | Description |
---|---|---|
void |
DefineGrammarItemsWalker.ruleAction(Rule r) |
|
void |
DefineGrammarItemsWalker.ruleScopeSpec(Rule r) |
Modifier and Type | Field | Description |
---|---|---|
Rule |
RuleLabelScope.referencedRule |
Modifier and Type | Field | Description |
---|---|---|
Collection<? extends Collection<? extends Rule>> |
LeftRecursionCyclesMessage.cycles |
|
protected Set<Rule> |
Grammar.delegatedRuleReferences |
The list of all rules referenced in this grammar, not defined here,
and defined in a delegate grammar.
|
protected Set<Rule> |
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 object
|
protected Vector<Rule> |
CompositeGrammar.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.
|
protected Set<Rule> |
GrammarSanity.visitedDuringRecursionCheck |
The checkForLeftRecursion method needs to track what rules it has
visited to track infinite recursion.
|
Modifier and Type | Method | Description |
---|---|---|
Rule |
NFAFactory.getCurrentRule() |
|
Rule |
Grammar.getLocallyDefinedRule(String ruleName) |
|
Rule |
Grammar.LabelElementPair.getReferencedRule() |
|
Rule |
CompositeGrammar.getRule(String ruleName) |
|
Rule |
CompositeGrammarTree.getRule(String ruleName) |
Find a rule by looking in current grammar then down towards the
delegate grammars.
|
Rule |
Grammar.getRule(String ruleName) |
|
Rule |
Grammar.getRule(String scopeName,
String ruleName) |
Modifier and Type | Method | Description |
---|---|---|
List<? extends Collection<? extends Rule>> |
Grammar.checkAllRulesForLeftRecursion() |
|
List<Set<Rule>> |
GrammarSanity.checkAllRulesForLeftRecursion() |
Check all rules for infinite left recursion before analysis.
|
Set<? extends Rule> |
CompositeGrammar.getAllImportedRules(Grammar g) |
Get all rule definitions from all direct/indirect delegate grammars
of g.
|
Set<? extends Rule> |
Grammar.getAllImportedRules() |
Get set of all rules imported from all delegate grammars even if
indirectly delegated.
|
Set<Rule> |
Grammar.getDelegatedRuleReferences() |
|
Set<? extends Rule> |
CompositeGrammar.getDelegatedRules(Grammar g) |
Get set of rules for grammar g that need to have manual delegation
methods.
|
Set<? extends Rule> |
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.
|
Set<Rule> |
Grammar.getLeftRecursiveRules() |
Return a list of left-recursive rules; no analysis can be done
successfully on these.
|
Collection<Rule> |
Grammar.getRules() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
GrammarSanity.addRulesToCycle(Rule targetRule,
Rule enclosingRule,
List<Set<Rule>> listOfRecursiveCycles) |
enclosingRuleName calls targetRuleName, find the cycle containing
the target and add the caller.
|
StateCluster |
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,
org.antlr.runtime.Token label) |
Make sure a label doesn't conflict with another symbol.
|
boolean |
NameSpaceChecker.checkForLabelTypeMismatch(Rule r,
org.antlr.runtime.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,
org.antlr.runtime.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) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
GrammarSanity.addRulesToCycle(Rule targetRule,
Rule enclosingRule,
List<Set<Rule>> listOfRecursiveCycles) |
enclosingRuleName calls targetRuleName, find the cycle containing
the target and add the caller.
|
int |
NFAFactory.build_EOFStates(Collection<Rule> rules) |
add an EOF transition to any rule end NFAState that points to nothing
(i.e., for all those rules not invoked by another rule).
|
static void |
ErrorManager.leftRecursionCycles(Collection<? extends Set<? extends Rule>> cycles) |
|
protected boolean |
GrammarSanity.traceStatesLookingForLeftRecursion(NFAState s,
Set<NFAState> visitedStates,
List<Set<Rule>> listOfRecursiveCycles) |
From state s, look for any transition to a rule that is currently
being traced.
|
Constructor | Description |
---|---|
RuleLabelScope(Rule referencedRule,
org.antlr.runtime.Token actionToken) |
Constructor | Description |
---|---|
LeftRecursionCyclesMessage(Collection<? extends Collection<? extends Rule>> cycles) |
Copyright © 1992–2019 ANTLR. All rights reserved.