public abstract class ExpressionTranslator<I extends VariableDeclaration,R extends Resolver<I>,E extends ExpressionStatement> extends ExpressionTranslator implements ResolutionListener, StringResolver.IExpressionTranslator<I,R>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ExpressionTranslator.CallType
Defines basic VIL call types.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<VarModelIdentifierExpression,org.eclipse.emf.ecore.EObject> |
ivmlWarnings |
private VarModelIdentifierExpression |
lastVarModelIdentifierEx |
| Constructor and Description |
|---|
ExpressionTranslator()
Creates an expression translator (to be used within this package only).
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
assertBooleanExpression(Expression expression,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causingFeature)
Asserts the given expression to be of Boolean type.
|
protected abstract java.lang.String |
cannotAssignHint()
A hint if an assignment is not allowed.
|
protected AbstractCallExpression |
checkCallExpression(AbstractCallExpression callEx,
ExpressionTranslator.CallType type,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call)
Performs generic call expression checks after creation.
|
private void |
checkOclEnumCompliance(java.lang.String name,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
Checks the given enumeration literal name for OCL compliance.
|
protected VilException |
checkSemantics(Expression expr)
Checks the semantics of a potential call candidate.
|
protected boolean |
continueResolution(VilException semanticException)
Returns whether resolution shall be continued in case of multiple similar call expressions.
|
private Expression |
convertToVersion(java.lang.String text,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant arg,
R resolver) |
protected static Expression |
createConstant(TypeDescriptor<?> type,
java.lang.Object value,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causingFeature,
TypeRegistry registry)
Creates a constant.
|
protected abstract E |
createExpressionStatement(Expression expression,
R resolver)
Creates an expression statement.
|
protected abstract ExpressionVersionRestriction |
createExpressionVersionRestriction(Expression expr,
VariableDeclaration decl,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature feature)
Creates an expression version restriction matching this class.
|
protected abstract I |
createImplicitVariableDeclaration(java.lang.String name,
TypeDescriptor<?> type,
boolean isConstant,
Expression expression,
R resolver)
Creates a new implicit variable declaration.
|
protected abstract I |
createVariableDeclaration(java.lang.String name,
TypeDescriptor<?> type,
boolean isConstant,
Expression expression,
R resolver)
Creates a new variable declaration.
|
void |
enactIvmlWarnings()
Enacts the IVML warnings not resolved by "function pointers" so far.
|
void |
error(AbstractException exception,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
Turns a buildlang exception into a xText error.
|
private static java.lang.String |
getName(org.eclipse.emf.ecore.EObject cause)
Tries to obtain the name of
cause. |
private void |
ivmlWarning(java.lang.String name,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causingFeature)
Creates a warning due to an unresolved IVML element.
|
private Expression |
normalizeStringExpression(Expression ex,
java.lang.String st)
Normalizes a string expression, i.e., if
ex (within a CompositeExpression is not a constant,
a StringExpression containing the expression is inserted instead. |
abstract Expression |
parseExpression(java.lang.String expression,
R resolver,
java.lang.StringBuilder warnings)
Parse the given expression.
|
private FieldAccessExpression |
process(VariableDeclaration var,
FieldAccessExpression last,
java.lang.String name,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant elt) |
protected Expression |
processAdditiveExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.AdditiveExpression ex,
R resolver)
Processes an additive expression.
|
CallArgument[] |
processArguments(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ArgumentList arguments,
R resolver)
Processes an argument list and translates them into call arguments.
|
Expression |
processAssignment(org.eclipse.emf.ecore.EObject cause,
TypeDescriptor<?> type,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression ex,
R resolver)
Processes an assignment.
|
protected abstract Expression |
processCall(Expression firstParam,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call,
ExpressionTranslator.CallType type,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression arrayEx,
R resolver)
Processes a function call.
|
protected Expression |
processConstant(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant arg,
R resolver)
Processes a constant argument.
|
private ContainerInitializerExpression |
processContainerInitializer(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ContainerInitializer initializer,
R resolver)
Processes a container initializer expression.
|
private java.util.ArrayList<I> |
processDeclarators(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call,
TypeDescriptor<?> implicitType,
java.util.List<CallArgument> arguments,
R resolver)
Processes a declarator.
|
protected Expression |
processEqualityExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.EqualityExpression ex,
R resolver)
Processes an equality expression.
|
Expression |
processExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression ex,
R resolver)
Creates the expression tree for a given expression.
|
E |
processExpressionStatement(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ExpressionStatement expr,
R resolver)
Processes an expression statement.
|
Expression |
processLogicalExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.LogicalExpression ex,
R resolver)
Processes a logical expression.
|
protected Expression |
processMultiplicativeExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.MultiplicativeExpression ex,
R resolver)
Processes a multiplicative expression.
|
protected Expression |
processPostfixExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.PostfixExpression ex,
R resolver)
Processes a postfix expression.
|
Expression |
processPrimaryExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.PrimaryExpression ex,
R resolver)
Processes a primary expression.
|
protected Expression |
processQualifiedValue(java.lang.String name,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant arg,
org.eclipse.emf.ecore.EStructuralFeature feature,
R resolver)
Processes a qualified value and creates variable expressions.
|
protected Expression |
processRelationalExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.RelationalExpression ex,
R resolver)
Processes a relational expression.
|
IVersionRestriction |
processRestriction(java.lang.String name,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionSpec spec,
R resolver)
Processes an import restriction.
|
protected Expression |
processSubCalls(Expression firstParam,
org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.SubCall> followups,
R resolver)
Processes sub calls, i.e., calls connected by ".".
|
TypeDescriptor<?> |
processType(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type,
R resolver)
Processes the given type and tries to resolve it to a VIL type.
|
protected TypeDescriptor<?>[] |
processTypeParameter(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeParameters param,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type,
R resolver)
Processes the type parameter.
|
protected Expression |
processUnaryExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.UnaryExpression ex,
R resolver)
Processes a unary expression.
|
I |
processVariableDeclaration(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration decl,
R resolver)
Processes a variable declaration.
|
void |
reProcessVariableDeclaration(I decl,
R resolver)
Re-processes a variable declaration in order to get rid of
DeferredResolvableOperationExpression. |
private Expression |
resolveCallArgumentExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.NamedArgument param,
int paramIndex,
java.util.List<I> iterators,
java.util.List<CallArgument> arguments,
R resolver)
Tries to resolve a call argument.
|
protected java.lang.String |
resolveCallArguments(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call,
java.util.List<I> iterators,
java.util.List<CallArgument> arguments,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression arrayEx,
R resolver)
Resolves call arguments.
|
void |
resolved(VarModelIdentifierExpression ex)
Is called if
ex was resolved. |
protected java.util.List<I> |
resolveIteratorDeclarations(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call,
ExpressionTranslator.CallType type,
java.util.List<CallArgument> arguments,
R resolver)
Resolves the iterator declarations.
|
private TypeDescriptor<?> |
resolveModelType(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type,
java.lang.String typeName,
R resolver)
Resolves a model type.
|
private void |
throwVariableCannotBeInitialized(org.eclipse.emf.ecore.EObject cause,
java.lang.String name,
TypeDescriptor<?> declType,
TypeDescriptor<?> initType)
Throws a
TranslatorException that a variable cannot be initialized. |
private ExpressionEvaluator |
tryIteratorExpression(java.util.List<CallArgument> arguments,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.NamedArgument param,
R resolver)
Tries to compose an iterator expression (
ExpressionEvaluator) |
void |
warning(AbstractException exception,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
Turns a buildlang exception into a xText warning.
|
void |
warnVersionRestrictions(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionSpec spec)
Issues implementation warnings about version restrictions.
|
clearMessages, clearMessages, collect, error, error, getErrorCount, getMessage, getMessageCount, warningerrorprivate java.util.Map<VarModelIdentifierExpression,org.eclipse.emf.ecore.EObject> ivmlWarnings
private VarModelIdentifierExpression lastVarModelIdentifierEx
public ExpressionTranslator()
public Expression processExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonpublic void enactIvmlWarnings()
private void ivmlWarning(java.lang.String name,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causingFeature)
name - the name of the elementcause - the causing ECore elementcausingFeature - the causing ECore featurepublic E processExpressionStatement(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ExpressionStatement expr, R resolver) throws TranslatorException
expr - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails due to semantic reasonscannotAssignHint()protected abstract java.lang.String cannotAssignHint()
protected abstract E createExpressionStatement(Expression expression, R resolver)
expression - the expressionresolver - the resolver instancepublic Expression processLogicalExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.LogicalExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected Expression processEqualityExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.EqualityExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected Expression processRelationalExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.RelationalExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected Expression processAdditiveExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.AdditiveExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected Expression processMultiplicativeExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.MultiplicativeExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected Expression processUnaryExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.UnaryExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected Expression processPostfixExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.PostfixExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected java.util.List<I> resolveIteratorDeclarations(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call, ExpressionTranslator.CallType type, java.util.List<CallArgument> arguments, R resolver) throws TranslatorException
call is already
checked to be valid.call - the call holding the iterator declarationstype - the type of the call (not the return type)TranslatorException - in case that the translation fails for some reasonprivate java.util.ArrayList<I> processDeclarators(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call, TypeDescriptor<?> implicitType, java.util.List<CallArgument> arguments, R resolver) throws TranslatorException
call - the actual callimplicitType - the implicit type of the declarator to check against or to use if no explicit type is given,
may be null if the underlying type declares the collection implicitly (see deleteJavaCall). In the
latter case, the type must be explicitly given by the declarator.resolver - the resolverarguments - the call arguments (may be changed to enable implicit collection iterators)TranslatorException - in case that the translation failsprotected java.lang.String resolveCallArguments(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call,
java.util.List<I> iterators,
java.util.List<CallArgument> arguments,
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression arrayEx,
R resolver)
throws TranslatorException
call - the call to resolve the arguments foriterators - the iterators (may be changed as a side effect)arguments - the arguments created so far (may be the operator, list is modified as a side effect)arrayEx - an array access expression (may be null, but then call is required)resolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprivate Expression resolveCallArgumentExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.NamedArgument param, int paramIndex, java.util.List<I> iterators, java.util.List<CallArgument> arguments, R resolver) throws TranslatorException
param - the parameterparamIndex - the 0-based index of param in the call being processediterators - the iterators known so far (may be changed as a side effect)arguments - the call argumentsresolver - the resolver instanceTranslatorException - in case that resolution failsprivate ExpressionEvaluator tryIteratorExpression(java.util.List<CallArgument> arguments, de.uni_hildesheim.sse.vil.expressions.expressionDsl.NamedArgument param, R resolver) throws TranslatorException
ExpressionEvaluator)arguments - the arguments to try to construct the expression fromparam - the actual parameter to do the resolution forresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the expression cannot be createdprotected abstract I createVariableDeclaration(java.lang.String name, TypeDescriptor<?> type, boolean isConstant, Expression expression, R resolver)
name - the name of the variabletype - the type of the variableisConstant - whether this variable is a constantexpression - an expression denoting the initial value (may be null)resolver - the resolver instanceprotected abstract I createImplicitVariableDeclaration(java.lang.String name, TypeDescriptor<?> type, boolean isConstant, Expression expression, R resolver)
name - the name of the variabletype - the type of the variableisConstant - whether this variable is a constantexpression - an expression denoting the initial value (may be null)resolver - the resolver instanceprotected abstract Expression processCall(Expression firstParam, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call, ExpressionTranslator.CallType type, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression arrayEx, R resolver) throws TranslatorException
firstParam - the first parameter (may be null)call - the function all (may be null, but then arrayEx is required)arrayEx - an array access expression (may be null, but then call is required)resolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected AbstractCallExpression checkCallExpression(AbstractCallExpression callEx, ExpressionTranslator.CallType type, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Call call) throws TranslatorException
callEx - the call expression to be checked (may be null if not resolvable)type - the call typecall - the originating ECore call elementcallExTranslatorException - in case of serious problems, e.g., callEx is nullprotected VilException checkSemantics(Expression expr)
expr - the expression to be checkedexpr if ok or nullprotected Expression processSubCalls(Expression firstParam, org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.SubCall> followups, R resolver) throws TranslatorException
firstParam - the first parameter (the expression before the ".")followups - the follow-up callsresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonpublic Expression processPrimaryExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.PrimaryExpression ex, R resolver) throws TranslatorException
ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonpublic CallArgument[] processArguments(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ArgumentList arguments, R resolver) throws TranslatorException
arguments - the arguments to be translatedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonpublic abstract Expression parseExpression(java.lang.String expression, R resolver, java.lang.StringBuilder warnings) throws VilException
parseExpression in interface StringResolver.IExpressionTranslator<I extends VariableDeclaration,R extends Resolver<I>>expression - the expression as stringresolver - the resolverwarnings - a collector for warningsVilException - if problems occur while parsing / resolvingprotected Expression processConstant(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant arg, R resolver) throws TranslatorException
arg - the constant to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprivate Expression normalizeStringExpression(Expression ex, java.lang.String st) throws VilException
ex (within a CompositeExpression is not a constant,
a StringExpression containing the expression is inserted instead. This allows recursive/nested
variable/expression substitution without having the required string quotes being quoted within a string.ex - the expression to checkex or a modified exVilException - if creating the modified expression failsprivate Expression convertToVersion(java.lang.String text, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant arg, R resolver) throws TranslatorException
TranslatorExceptionprivate FieldAccessExpression process(VariableDeclaration var, FieldAccessExpression last, java.lang.String name, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant elt) throws TranslatorException
TranslatorExceptionprotected Expression processQualifiedValue(java.lang.String name, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Constant arg, org.eclipse.emf.ecore.EStructuralFeature feature, R resolver) throws TranslatorException
name - the qualified namearg - the constant to be processedfeature - the feature corresponding to argresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reason, in particular if
ITER cannot be resolvedprivate void checkOclEnumCompliance(java.lang.String name,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
name - the namecause - the causing objectcauseFeature - the causing featureprotected static final Expression createConstant(TypeDescriptor<?> type, java.lang.Object value, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature, TypeRegistry registry) throws TranslatorException
type - the type of the constantvalue - the value of the constantcause - the Ecore language model element for which the exception was
causedcausingFeature - the specific language feature within cause which
caused the exceptionTranslatorException - in case that type resolution failspublic TypeDescriptor<?> processType(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type, R resolver) throws TranslatorException
type - the type to be processedresolver - the resolver instanceTranslatorException - in case that type resolution failsprivate TypeDescriptor<?> resolveModelType(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type, java.lang.String typeName, R resolver) throws TranslatorException
type - the type as ECore instancetypeName - the name of the typeresolver - the resolverTranslatorException - in case of a serious resolution problemprivate ContainerInitializerExpression processContainerInitializer(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ContainerInitializer initializer, R resolver) throws TranslatorException
initializer - the container initializer expression as ECore instanceresolver - a resolver instance for resolving variables etc.TranslatorException - in case that type resolution failsprotected TypeDescriptor<?>[] processTypeParameter(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeParameters param, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type, R resolver) throws TranslatorException
param - the ECore instance containing the type parametertype - the type the parameter are assigned toresolver - the resolver instanceTranslatorException - in case that type resolution failspublic Expression processAssignment(org.eclipse.emf.ecore.EObject cause, TypeDescriptor<?> type, de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression ex, R resolver) throws TranslatorException
decl - the variable declaration to assign totype - the type of the variableex - the expression defining the right side of the assignment (may be null)text - a text describing the left side in case of an errorresolver - the resolver instanceex was nullTranslatorException - in case that type resolution / compliance failspublic I processVariableDeclaration(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration decl, R resolver) throws TranslatorException
decl - the declarationresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation failspublic void reProcessVariableDeclaration(I decl, R resolver) throws TranslatorException
DeferredResolvableOperationExpression.decl - the declarationresolver - the resolverTranslatorException - in case that re-processing fails for some reasonprivate void throwVariableCannotBeInitialized(org.eclipse.emf.ecore.EObject cause,
java.lang.String name,
TypeDescriptor<?> declType,
TypeDescriptor<?> initType)
throws TranslatorException
TranslatorException that a variable cannot be initialized.cause - the causing ECore objectname - the name of the object (inferred from cause if null if possible)declType - the declaration VIL typeinitType - the init expression VIL typeTranslatorException - the created exceptionprivate static java.lang.String getName(org.eclipse.emf.ecore.EObject cause)
cause.cause - the cause"?"protected boolean continueResolution(VilException semanticException)
semanticException - the exception being thrown by the (partial) call resolutiontrue if resolution shall be continued (there was an exception and it points to a resolution
or a semantic problem), false elsepublic void error(AbstractException exception, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causeFeature)
exception - the exception to usedcause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalspublic void warning(AbstractException exception, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causeFeature)
exception - the exception to usedcause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalspublic void warnVersionRestrictions(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionSpec spec)
spec - the version specification (may be null)public IVersionRestriction processRestriction(java.lang.String name, de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionSpec spec, R resolver) throws TranslatorException
name - the name of the importspec - the version specification to be processedTranslatorException - in case of any translation problemprotected abstract ExpressionVersionRestriction createExpressionVersionRestriction(Expression expr, VariableDeclaration decl, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature feature) throws RestrictionEvaluationException
expr - the expression for the restrictiondecl - the version variablecause - the grammar cause for this callfeature - the causing featureRestrictionEvaluationException - in case of any type related problemspublic void resolved(VarModelIdentifierExpression ex)
ResolutionListenerex was resolved.resolved in interface ResolutionListenerex - the resolved expressionpublic Expression assertBooleanExpression(Expression expression, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causingFeature) throws TranslatorException
expression - the expression to checkcause - the causing ECore AST objectcausingFeature - the causing featureexpression or a converted expressionTranslatorException - thrown if the expression is not of type BooleanCopyright © 2009 - 2018 SSE. All Rights Reserved.