public class ConstraintAstResolver extends Object
The main method is resolve(RuleFileImpl).
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,IValidationFragmentDeclaration> |
fragmentIds |
protected Map<String,IVariableDeclaration> |
globalVariableIds |
protected Set<String> |
ruleIds |
protected Set<String> |
ruleSetIds |
| Constructor and Description |
|---|
ConstraintAstResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
collectFragmentIds(RuleFileImpl ruleFile,
List<NRLError> errors)
Collect all fragment ids
|
protected void |
collectGlobalVariableIds(RuleFileImpl ruleFile,
List<NRLError> errors)
Collect global variables.
|
protected void |
collectIdentifiers(RuleFileImpl ruleFile,
List<NRLError> errors)
Collect all identifiable parts.
|
protected void |
collectRuleIds(RuleFileImpl ruleFile,
List<NRLError> errors)
Collect all rule ids
|
protected void |
collectRuleSetIds(RuleFileImpl ruleFile,
List<NRLError> errors)
Collect all rule set ids
|
List<NRLError> |
resolve(RuleFileImpl ruleFile)
Resolve the rule file and return a list of
SemanticError objects if errors occurred. |
protected void |
resolveIncompleteExistsStatements(RuleFileImpl ruleFile,
List<NRLError> errors)
This resolves inclompete exists statements.
|
protected void |
resolveReferences(RuleFileImpl ruleFile,
List<NRLError> errors)
Resolve references within the AST.
|
protected void |
resolveRuleSets(RuleFileImpl ruleFile,
List<NRLError> errors)
Resolve rule set references.
|
protected void |
validateRuleParameters(IRuleFile ruleFile,
List<NRLError> errors)
Ensure that the names of rule parameters are ok.
|
protected Map<String,IValidationFragmentDeclaration> fragmentIds
protected Map<String,IVariableDeclaration> globalVariableIds
public List<NRLError> resolve(RuleFileImpl ruleFile)
SemanticError objects if errors occurred.ruleFile - the rule file to resolveprotected void collectIdentifiers(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule fileerrors - errors, if any are found during collectionprotected void collectFragmentIds(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule fileerrors - errors, if any are found during collectionprotected void collectRuleIds(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule fileerrors - errors, if any are found during collectionprotected void collectRuleSetIds(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule fileerrors - errors to add to , if anyprotected void collectGlobalVariableIds(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule fileerrors - error listprotected void resolveReferences(RuleFileImpl ruleFile, List<NRLError> errors)
com.modeltwozero.nrl.parser.ast.IValidationFragmentApplication nodes
and looks up the property being applied, setting a cross-reference.
ruleFile - the rule file to processerrors - the error list to add to if errors occurprotected void resolveIncompleteExistsStatements(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule fileerrors - the error list to add toprotected void resolveRuleSets(RuleFileImpl ruleFile, List<NRLError> errors)
ruleFile - the rule file to processerrors - the error list to add toCopyright © 2006-2013. All Rights Reserved.