| Modifier and Type | Field and Description |
|---|---|
| pack-priv Map | |
| pack-priv SymbolCollector | |
| public ErrorManager | |
| pack-priv Grammar | |
| pack-priv Map | |
| protected final Set | |
| pack-priv Set |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | checkDeclarationRuleConflicts(Rule r, AttributeDict attributes, Set<String> ruleNames, ErrorType errorType)
|
| public void | |
| public void | |
| public void | checkForLabelConflicts(Collection<Rule> rules)
Make sure a label doesn't conflict with another symbol. |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| private void | |
| protected void | checkLocalConflictingDeclarations(Rule r, AttributeDict attributes, AttributeDict referenceAttributes, ErrorType errorType)
|
| protected void | |
| public void | |
| private String | |
| private List | |
| public void |
| actionScopeToActionNames | back to summary |
|---|---|
| pack-priv Map<String, Set<String>> actionScopeToActionNames | |
| collector | back to summary |
|---|---|
| pack-priv SymbolCollector collector | |
| errMgr | back to summary |
|---|---|
| public ErrorManager errMgr | |
| g | back to summary |
|---|---|
| pack-priv Grammar g | |
| nameToRuleMap | back to summary |
|---|---|
| pack-priv Map<String, Rule> nameToRuleMap | |
| reservedNames | back to summary |
|---|---|
| protected final Set<String> reservedNames | |
| tokenIDs | back to summary |
|---|---|
| pack-priv Set<String> tokenIDs | |
| SymbolChecks | back to summary |
|---|---|
| public SymbolChecks(Grammar g, SymbolCollector collector) | |
| checkActionRedefinitions | back to summary |
|---|---|
| public void checkActionRedefinitions(List<GrammarAST> actions) | |
| checkDeclarationRuleConflicts | back to summary |
|---|---|
| protected void checkDeclarationRuleConflicts(Rule r, AttributeDict attributes, Set<String> ruleNames, ErrorType errorType) | |
| checkForAttributeConflicts | back to summary |
|---|---|
| public void checkForAttributeConflicts(Rule r) | |
| checkForLabelConflict | back to summary |
|---|---|
| public void checkForLabelConflict(Rule r, GrammarAST labelID) | |
| checkForLabelConflicts | back to summary |
|---|---|
| public void checkForLabelConflicts(Collection<Rule> rules) 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. Also they must have same type for repeated defs. | |
| checkForModeConflicts | back to summary |
|---|---|
| public void checkForModeConflicts(Grammar g) | |
| checkForOverlap | back to summary |
|---|---|
| private void checkForOverlap(Grammar g, Rule rule1, Rule rule2, List<String> firstTokenStringValues, List<String> secondTokenStringValues) For same rule compare values from next index: TOKEN_WITH_SAME_VALUES: 'asdf' | 'asdf'; For different rules compare from start value: TOKEN1: 'asdf'; TOKEN2: 'asdf'; | |
| checkForQualifiedRuleIssues | back to summary |
|---|---|
| public void checkForQualifiedRuleIssues(Grammar g, List<GrammarAST> qualifiedRuleRefs) | |
| checkForTypeMismatch | back to summary |
|---|---|
| private void checkForTypeMismatch(Rule r, LabelElementPair prevLabelPair, LabelElementPair labelPair) | |
| checkForUnreachableTokens | back to summary |
|---|---|
| public void checkForUnreachableTokens(Grammar g) Algorithm steps:
1. Collect all simple string literals (i.e. 'asdf', 'as' 'df', but not [a-z]+, 'a'..'z')
for all lexer rules in each mode except of autogenerated tokens ( | |
| checkLabelPairs | back to summary |
|---|---|
| private void checkLabelPairs(Rule r, Map<String, LabelElementPair> labelNameSpace, List<LabelElementPair> pairs) | |
| checkLocalConflictingDeclarations | back to summary |
|---|---|
| protected void checkLocalConflictingDeclarations(Rule r, AttributeDict attributes, AttributeDict referenceAttributes, ErrorType errorType) | |
| checkReservedNames | back to summary |
|---|---|
| protected void checkReservedNames(Collection<Rule> rules) | |
| checkRuleArgs | back to summary |
|---|---|
| public void checkRuleArgs(Grammar g, List<GrammarAST> rulerefs) | |
| findAltLabelName | back to summary |
|---|---|
| private String findAltLabelName(CommonTree label) | |
| getSingleTokenValues | back to summary |
|---|---|
| private List Returns . list of simple string literals for rule {@param rule} | |
| process | back to summary |
|---|---|
| public void process() | |