public class NameSpaceChecker extends Object
Constructor | Description |
---|---|
NameSpaceChecker(Grammar grammar) |
Modifier and Type | Method | Description |
---|---|---|
void |
checkConflicts() |
|
protected void |
checkForGlobalScopeTokenConflict(AttributeScope scope) |
|
protected void |
checkForLabelConflict(Rule r,
org.antlr.runtime.Token label) |
Make sure a label doesn't conflict with another symbol.
|
boolean |
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 |
checkForRuleArgumentAndReturnValueConflicts(Rule r) |
|
protected void |
checkForRuleDefinitionProblems(Rule r) |
|
void |
checkForRuleScopeAttributeConflict(Rule r,
Attribute attribute) |
Check for collision of a rule-scope dynamic attribute with:
arg, return value, rule name itself.
|
protected void |
lookForReferencesToUndefinedSymbols() |
If ref to undefined rule, give error at first occurrence.
|
protected Grammar grammar
public NameSpaceChecker(Grammar grammar)
public void checkConflicts()
protected void checkForRuleArgumentAndReturnValueConflicts(Rule r)
protected void checkForRuleDefinitionProblems(Rule r)
protected void lookForReferencesToUndefinedSymbols()
protected void checkForGlobalScopeTokenConflict(AttributeScope scope)
public void checkForRuleScopeAttributeConflict(Rule r, Attribute attribute)
protected void checkForLabelConflict(Rule r, org.antlr.runtime.Token label)
public boolean checkForLabelTypeMismatch(Rule r, org.antlr.runtime.Token label, int type)
Copyright © 1992–2019 ANTLR. All rights reserved.