|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.nrl.parser.ast.impl.ConstraintAstResolver
public class ConstraintAstResolver
A resolver class that performs basic processing of the AST and returns semantic errors if it fails.
The main method is resolve(RuleFileImpl).
| Field Summary | |
|---|---|
protected Map<String,IValidationFragmentDeclaration> |
fragmentIds
|
protected Map<String,IVariableDeclaration> |
globalVariableIds
|
protected Set<String> |
ruleIds
|
protected Set<String> |
ruleSetIds
|
| Constructor Summary | |
|---|---|
ConstraintAstResolver()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Set<String> ruleIds
protected Set<String> ruleSetIds
protected Map<String,IValidationFragmentDeclaration> fragmentIds
protected Map<String,IVariableDeclaration> globalVariableIds
| Constructor Detail |
|---|
public ConstraintAstResolver()
| Method Detail |
|---|
public List<NRLError> resolve(RuleFileImpl ruleFile)
SemanticError objects if errors occurred.
ruleFile - the rule file to resolve
protected void collectIdentifiers(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - errors, if any are found during collection
protected void collectFragmentIds(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - errors, if any are found during collection
protected void collectRuleIds(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - errors, if any are found during collection
protected void collectRuleSetIds(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - errors to add to , if any
protected void collectGlobalVariableIds(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - error list
protected 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 occur
protected void resolveIncompleteExistsStatements(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - the error list to add to
protected void resolveRuleSets(RuleFileImpl ruleFile,
List<NRLError> errors)
ruleFile - the rule file to processerrors - the error list to add to
protected void validateRuleParameters(IRuleFile ruleFile,
List<NRLError> errors)
ruleFile - the rule fileerrors - the errors to add to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||