|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nrl.parser.ast.impl.AntlrModelResolver
public class AntlrModelResolver
This class resolves all model references on the AST and replaces the string values with with proper references to model elements. It may generate errors in this process, if model elements are not found.
Field Summary | |
---|---|
protected IModelCollection |
models
|
Constructor Summary | |
---|---|
AntlrModelResolver(IModelCollection models)
|
Method Summary | |
---|---|
protected void |
eliminateExistenceWithBackreference(IConstraint constraint,
IModelElement context)
|
protected void |
eliminateExistenceWithBackreference(IRuleFile ruleFile)
Eliminate any "exists" nodes whose element reference refers to the context element. |
protected Map<String,IVariableDeclaration> |
getGlobalVariablesAsMap(IRuleFile ruleFile)
|
List<NRLError> |
resolve(IRuleFile ruleFile)
Main method - resolve all model references in the entire AST. |
protected void |
resolveAction(IAction action,
IClassifier context,
Map<String,IVariableDeclaration> globalVariables,
List<Variable> variables,
List<NRLError> errors)
|
protected void |
resolveActionFragment(IActionFragmentDeclaration macro,
Map<String,IVariableDeclaration> globalVariables,
List<NRLError> errors)
|
protected void |
resolveActions(IRuleFile ruleFile,
List<NRLError> errors)
|
protected void |
resolveConstraints(IRuleFile ruleFile,
Map<String,IVariableDeclaration> globalVariables,
List<NRLError> errors)
|
protected void |
resolveDeclarationsWithoutContext(IRuleFile ruleFile)
Resolve all action rule/macro declarations that do not have a context, i.e. |
protected void |
resolveGlobalVariables(IRuleFile ruleFile,
List<NRLError> errors)
|
protected void |
resolveMultiContextDeclarations(IRuleFile ruleFile,
List<NRLError> errors)
|
protected void |
resolveRuleSets(IRuleFile ruleFile,
Map<String,IVariableDeclaration> globalVariables,
List<NRLError> errors)
Resolve the context and constraints of rule set declarations |
protected void |
resolveSingleContextDeclarations(IRuleFile ruleFile,
List<NRLError> errors)
|
protected void |
resolveValidationFragmentDeclaration(IValidationFragmentDeclaration decl,
Map<String,IVariableDeclaration> globalVariables,
List<NRLError> errors)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IModelCollection models
Constructor Detail |
---|
public AntlrModelResolver(IModelCollection models)
Method Detail |
---|
protected void eliminateExistenceWithBackreference(IConstraint constraint, IModelElement context)
protected void eliminateExistenceWithBackreference(IRuleFile ruleFile)
ruleFile
- the file to processprotected Map<String,IVariableDeclaration> getGlobalVariablesAsMap(IRuleFile ruleFile)
public List<NRLError> resolve(IRuleFile ruleFile)
ruleFile
- the rule file AST
protected void resolveAction(IAction action, IClassifier context, Map<String,IVariableDeclaration> globalVariables, List<Variable> variables, List<NRLError> errors)
protected void resolveActionFragment(IActionFragmentDeclaration macro, Map<String,IVariableDeclaration> globalVariables, List<NRLError> errors)
protected void resolveActions(IRuleFile ruleFile, List<NRLError> errors)
protected void resolveConstraints(IRuleFile ruleFile, Map<String,IVariableDeclaration> globalVariables, List<NRLError> errors)
protected void resolveDeclarationsWithoutContext(IRuleFile ruleFile)
ruleFile
- the rule fileprotected void resolveGlobalVariables(IRuleFile ruleFile, List<NRLError> errors)
protected void resolveMultiContextDeclarations(IRuleFile ruleFile, List<NRLError> errors)
protected void resolveValidationFragmentDeclaration(IValidationFragmentDeclaration decl, Map<String,IVariableDeclaration> globalVariables, List<NRLError> errors)
protected void resolveRuleSets(IRuleFile ruleFile, Map<String,IVariableDeclaration> globalVariables, List<NRLError> errors)
ruleFile
- the rule fileerrors
- the error list to add toprotected void resolveSingleContextDeclarations(IRuleFile ruleFile, List<NRLError> errors)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |