public class ExpressionTranslator extends ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>
ExpressionTranslator.CallType| Constructor and Description |
|---|
ExpressionTranslator() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
cannotAssignHint()
A hint if an assignment is not allowed.
|
protected ExpressionStatement |
createExpressionStatement(Expression expression,
Resolver resolver)
Creates an expression statement.
|
protected 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 VariableDeclaration |
createImplicitVariableDeclaration(java.lang.String name,
TypeDescriptor<?> type,
boolean isConstant,
Expression expression,
Resolver resolver)
Creates a new implicit variable declaration.
|
protected VariableDeclaration |
createVariableDeclaration(java.lang.String name,
TypeDescriptor<?> type,
boolean isConstant,
Expression expression,
Resolver resolver)
Creates a new variable declaration.
|
Expression |
parseExpression(java.lang.String expression,
Resolver resolver,
java.lang.StringBuilder warnings)
Parse the given expression.
|
private AlternativeExpression |
processAlternative(de.uni_hildesheim.sse.vilBuildLanguage.Alternative alt,
Resolver resolver)
Processes an alternative expression.
|
protected 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,
Resolver resolver)
Processes a function call.
|
ExpressionStatement |
processExpressionStatement(de.uni_hildesheim.sse.vilBuildLanguage.ExpressionStatement expr,
Resolver resolver)
Processes an expression statement.
|
private ForStatement |
processForStatement(de.uni_hildesheim.sse.vilBuildLanguage.For stmt,
Resolver resolver)
Processes a "for" statement.
|
private InstantiateExpression |
processInstantiate(de.uni_hildesheim.sse.vilBuildLanguage.Instantiate inst,
Resolver resolver)
Processes an instantiate expression.
|
protected JoinExpression |
processJoin(de.uni_hildesheim.sse.vilBuildLanguage.Join join,
Resolver resolver)
Processes a join.
|
protected JoinVariableDeclaration |
processJoinVariable(de.uni_hildesheim.sse.vilBuildLanguage.JoinVariable var,
Resolver resolver)
Processes a join variable.
|
private MapExpression |
processMap(de.uni_hildesheim.sse.vilBuildLanguage.Map map,
Resolver resolver)
Processes a "map" expression.
|
Expression |
processPrimaryExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.PrimaryExpression ex,
Resolver resolver)
Processes a primary expression.
|
private WhileStatement |
processWhileStatement(de.uni_hildesheim.sse.vilBuildLanguage.While stmt,
Resolver resolver)
Processes a "while" statement.
|
IRuleElement[] |
resolveBlock(java.util.List<? extends de.uni_hildesheim.sse.vilBuildLanguage.RuleElement> block,
Resolver resolver)
Resolves a block of rule elements.
|
IRuleElement[] |
resolveBlock(de.uni_hildesheim.sse.vilBuildLanguage.RuleElementBlock block,
Resolver resolver)
Resolves a block of rule elements.
|
protected IRuleElement |
resolveRuleElement(de.uni_hildesheim.sse.vilBuildLanguage.RuleElement elt,
Resolver resolver)
Called if the default processing of rule elements cannot be applied.
|
private IRuleBlock |
resolveStatementOrBlock(de.uni_hildesheim.sse.vilBuildLanguage.StatementOrBlock part,
Resolver resolver)
Resolves a statement-or-block part.
|
assertBooleanExpression, checkCallExpression, checkSemantics, continueResolution, createConstant, enactIvmlWarnings, error, processAdditiveExpression, processArguments, processAssignment, processConstant, processEqualityExpression, processExpression, processExpressionStatement, processLogicalExpression, processMultiplicativeExpression, processPostfixExpression, processQualifiedValue, processRelationalExpression, processRestriction, processSubCalls, processType, processTypeParameter, processUnaryExpression, processVariableDeclaration, reProcessVariableDeclaration, resolveCallArguments, resolved, resolveIteratorDeclarations, warning, warnVersionRestrictionsclearMessages, clearMessages, collect, error, error, getErrorCount, getMessage, getMessageCount, warningerrorpublic Expression processPrimaryExpression(de.uni_hildesheim.sse.vil.expressions.expressionDsl.PrimaryExpression ex, Resolver resolver) throws TranslatorException
processPrimaryExpression in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>ex - the expression to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprivate InstantiateExpression processInstantiate(de.uni_hildesheim.sse.vilBuildLanguage.Instantiate inst, Resolver resolver) throws TranslatorException
inst - resolver - TranslatorExceptionprivate AlternativeExpression processAlternative(de.uni_hildesheim.sse.vilBuildLanguage.Alternative alt, Resolver resolver) throws TranslatorException
alt - the ECore object representing the alternative expressionresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation failsprivate WhileStatement processWhileStatement(de.uni_hildesheim.sse.vilBuildLanguage.While stmt, Resolver resolver) throws TranslatorException
stmt - the ECore object representing the statementresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation failsprivate ForStatement processForStatement(de.uni_hildesheim.sse.vilBuildLanguage.For stmt, Resolver resolver) throws TranslatorException
stmt - the ECore object representing the statementresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation failsprivate MapExpression processMap(de.uni_hildesheim.sse.vilBuildLanguage.Map map, Resolver resolver) throws TranslatorException
map - the ECore object representing the expressionresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation failsprivate IRuleBlock resolveStatementOrBlock(de.uni_hildesheim.sse.vilBuildLanguage.StatementOrBlock part, Resolver resolver) throws TranslatorException
part - the ECore part object to be resolved (may be null)resolver - the resolverTranslatorException - in case of translation problemspublic IRuleElement[] resolveBlock(de.uni_hildesheim.sse.vilBuildLanguage.RuleElementBlock block, Resolver resolver)
block - the block to be resolvedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails due to semantic reasonspublic IRuleElement[] resolveBlock(java.util.List<? extends de.uni_hildesheim.sse.vilBuildLanguage.RuleElement> block, Resolver resolver)
block - the block to be resolvedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails due to semantic reasonsprotected IRuleElement resolveRuleElement(de.uni_hildesheim.sse.vilBuildLanguage.RuleElement elt, Resolver resolver) throws TranslatorException
elt - the rule elementresolver - the resolverTranslatorException - in case that resolving the rule element fails for some reasonprotected ExpressionStatement createExpressionStatement(Expression expression, Resolver resolver)
ExpressionTranslatorcreateExpressionStatement in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>expression - the expressionresolver - the resolver instancepublic ExpressionStatement processExpressionStatement(de.uni_hildesheim.sse.vilBuildLanguage.ExpressionStatement expr, Resolver 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 reasonsprotected JoinExpression processJoin(de.uni_hildesheim.sse.vilBuildLanguage.Join join, Resolver resolver) throws TranslatorException
join - the join to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected JoinVariableDeclaration processJoinVariable(de.uni_hildesheim.sse.vilBuildLanguage.JoinVariable var, Resolver resolver) throws TranslatorException
var - the variable to be processedresolver - a resolver instance for resolving variables etc.TranslatorException - in case that the translation fails for some reasonprotected 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, Resolver resolver) throws TranslatorException
processCall in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>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 VariableDeclaration createVariableDeclaration(java.lang.String name, TypeDescriptor<?> type, boolean isConstant, Expression expression, Resolver resolver)
ExpressionTranslatorcreateVariableDeclaration in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>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 VariableDeclaration createImplicitVariableDeclaration(java.lang.String name, TypeDescriptor<?> type, boolean isConstant, Expression expression, Resolver resolver)
ExpressionTranslatorcreateImplicitVariableDeclaration in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>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 ExpressionVersionRestriction createExpressionVersionRestriction(Expression expr, VariableDeclaration decl, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature feature) throws RestrictionEvaluationException
ExpressionTranslatorcreateExpressionVersionRestriction in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>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 Expression parseExpression(java.lang.String expression, Resolver resolver, java.lang.StringBuilder warnings) throws VilException
ExpressionTranslatorparseExpression in interface StringResolver.IExpressionTranslator<VariableDeclaration,Resolver>parseExpression in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>expression - the expression as stringresolver - the resolverwarnings - a collector for warningsVilException - if problems occur while parsing / resolvingprotected java.lang.String cannotAssignHint()
ExpressionTranslatorcannotAssignHint in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>Copyright © 2009 - 2018 SSE. All Rights Reserved.