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.
|
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.
|
assertBooleanExpression, checkCallExpression, checkSemantics, continueResolution, createConstant, enactIvmlWarnings, error, processAdditiveExpression, processArguments, processAssignment, processConstant, processEqualityExpression, processExpression, processExpressionStatement, processLogicalExpression, processMultiplicativeExpression, processPostfixExpression, processPrimaryExpression, processQualifiedValue, processRelationalExpression, processRestriction, processSubCalls, processType, processTypeParameter, processUnaryExpression, processVariableDeclaration, reProcessVariableDeclaration, resolveCallArguments, resolved, resolveIteratorDeclarations, warning, warnVersionRestrictionsclearMessages, clearMessages, collect, error, error, getErrorCount, getMessage, getMessageCount, warningerrorprotected 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 ExpressionStatement createExpressionStatement(Expression expression, Resolver resolver)
ExpressionTranslatorcreateExpressionStatement in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>expression - the expressionresolver - the resolver instanceprotected java.lang.String cannotAssignHint()
ExpressionTranslatorcannotAssignHint in class ExpressionTranslator<VariableDeclaration,Resolver,ExpressionStatement>Copyright © 2009 - 2018 SSE. All Rights Reserved.