public class NameSpaceChecker extends Object
Constructor and Description |
---|
NameSpaceChecker(Grammar grammar) |
Modifier and Type | Method and Description |
---|---|
void |
checkConflicts() |
protected void |
checkForGlobalScopeTokenConflict(AttributeScope scope) |
protected void |
checkForLabelConflict(Rule r,
antlr.Token label)
Make sure a label doesn't conflict with another symbol.
|
boolean |
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 |
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, antlr.Token label)
public boolean checkForLabelTypeMismatch(Rule r, antlr.Token label, int type)
Copyright © 2020. All rights reserved.