Package org.antlr.tool
Class NameSpaceChecker
java.lang.Object
org.antlr.tool.NameSpaceChecker
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
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
protected void
void
checkForRuleScopeAttributeConflict
(Rule r, Attribute attribute) Check for collision of a rule-scope dynamic attribute with: arg, return value, rule name itself.protected void
If ref to undefined rule, give error at first occurrence.
-
Field Details
-
grammar
-
-
Constructor Details
-
NameSpaceChecker
-
-
Method Details
-
checkConflicts
public void checkConflicts() -
checkForRuleArgumentAndReturnValueConflicts
-
checkForRuleDefinitionProblems
-
lookForReferencesToUndefinedSymbols
protected void lookForReferencesToUndefinedSymbols()If ref to undefined rule, give error at first occurrence. Give error if you cannot find the scope override on a rule reference. If you ref ID in a combined grammar and don't define ID as a lexer rule it is an error. -
checkForGlobalScopeTokenConflict
-
checkForRuleScopeAttributeConflict
Check for collision of a rule-scope dynamic attribute with: arg, return value, rule name itself. Labels are checked elsewhere. -
checkForLabelConflict
Make sure a label doesn't conflict with another symbol. Labels must not conflict with: rules, tokens, scope names, return values, parameters, and rule-scope dynamic attributes defined in surrounding rule. -
checkForLabelTypeMismatch
If type of previous label differs from new label's type, that's an error.
-