public class PtalonEvaluator extends AbstractPtalonEvaluator
| Yellow (celaine) |
| Yellow (celaine) |
AbstractPtalonEvaluator.IfTree, AbstractPtalonEvaluator.PtalonExpressionScope_actor, _currentIfTree, _imports, _scope, _transparentRelations| Constructor and Description |
|---|
PtalonEvaluator(PtalonActor actor)
Create a new PtalonEvaluator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActor(java.lang.String name)
Add an actor to the PtalonActor.
|
void |
addParameterAssign(java.lang.String parameterName,
java.lang.String expression)
Add an assignment of the specified parameter of this actor
declaration to the specified actor declaration.
|
void |
addPortAssign(java.lang.String portName,
java.lang.String connectPoint)
Add an assignment of the specified port of this actor
declaration to the containing Ptalon actor connection point,
which is either a port or a relation.
|
void |
addPortAssign(java.lang.String portName,
java.lang.String connectPointPrefix,
java.lang.String connectPointExpression)
Add an assignment of the specified port of this actor
declaration to the containing Ptalon actor connection point,
which is either a port or a relation.
|
void |
addSymbol(java.lang.String name,
java.lang.String type)
Add a symbol with the given name and type to the symbol table at the
current level of the if-tree hierarchy.
|
void |
addUnknownLeftSide(java.lang.String prefix,
java.lang.String expression)
Add the unknown left side to this actor declaration.
|
void |
enterActorDeclaration(java.lang.String name)
Enter the named actor declaration.
|
void |
exitActorDeclaration()
Exit the current actor declaration.
|
boolean |
isActorReady()
Returns true if the current actor declaration is ready to be
created.
|
java.lang.String |
popActorDeclaration()
Pop an actor off of the current tree and return the name.
|
void |
pushActorDeclaration(java.lang.String actorName)
Push an actor name onto the current tree, or create a new tree if
entering a new nested actor declaration.
|
void |
setActorParameter(java.lang.String paramName)
Set the parameter name for the current actor declaration, if
any, to the given parameter name.
|
void |
setActorSymbol(java.lang.String symbol)
Set the symbol in the PtalonCode which represents this
AbstractPtalonEvaluator's actor.
|
void |
setDanglingPortsOkay(boolean value)
Set whether or not dangling ports are okay.
|
void |
startAtTop()
Prepare the compiler to start at the outermost scope of the Ptalon
program during run time.
|
_getIndentPrefix, _getTimesEntered, _getType, _getTypeForScope, _inNewWhileIteration, _isPreservingTransformation, _processAttributes, _resetParameters, _setPreservingTransformation, addActorParameter, addActorParameter, addInPort, addOutPort, addParameter, addParameter, addPort, addRelation, addTransparentRelation, assignInternalParameters, enterForScope, enterIfScope, enterTransformation, evaluateBoolean, evaluateExpression, evaluateForScope, evaluateString, exitForScope, exitIfScope, exitTransformation, getMappedName, hasUnassignedParameters, inScope, isCreated, isForReady, isIfReady, isReady, negateObject, optionalObject, popForStatement, popIfStatement, preserveObject, pushForStatement, pushIfStatement, removeObject, setActiveBranch, setCurrentBranch, setNextExpressionpublic PtalonEvaluator(PtalonActor actor)
actor - The ptalon actor for this manager.public void addActor(java.lang.String name)
throws PtalonRuntimeException
name - The unique name of the actor declaration.PtalonRuntimeException - If there is any trouble
loading the actor.public void addParameterAssign(java.lang.String parameterName,
java.lang.String expression)
throws PtalonScopeException
parameterName - The name of the parameter.expression - The expression to be assigned to the parameter.PtalonScopeException - If this is not a top-level
actor declaration with respect to the assignment, or if
connectPoint is not a port or relation.public void addPortAssign(java.lang.String portName,
java.lang.String connectPoint)
throws PtalonScopeException
portName - The name of the port in thisconnectPoint - The name of the container's port or relation.PtalonScopeException - If this is not a top-level
actor declaration with respect to the assignment, or if
connectPoint is not a port or relation.public void addPortAssign(java.lang.String portName,
java.lang.String connectPointPrefix,
java.lang.String connectPointExpression)
throws PtalonScopeException
portName - The name of the port in thisconnectPointPrefix - The prefix of the name of the
container's port or relation.connectPointExpression - The variable suffix of the name
of the container's port or relation.PtalonScopeException - If this is not a top-level
actor declaration with respect to the assignment, or if
connectPoint is not a port or relation.public void addSymbol(java.lang.String name,
java.lang.String type)
throws PtalonScopeException
addSymbol in class AbstractPtalonEvaluatorname - The symbol name.type - The symbol type.PtalonScopeException - If a symbol with this name has
already been added somewhere in the current scope.public void addUnknownLeftSide(java.lang.String prefix,
java.lang.String expression)
prefix - The prefix for the unknown left side.expression - The suffix expression for the unknown left side.public void enterActorDeclaration(java.lang.String name)
throws PtalonRuntimeException
name - The name of the actor declaration.PtalonRuntimeException - If such an actor declaration
does not exist.public void exitActorDeclaration()
throws PtalonRuntimeException
PtalonRuntimeException - If already at the top-level
if scope.public boolean isActorReady()
throws PtalonRuntimeException
PtalonRuntimeException - If thrown trying to access a
parameter, or if there is no actor declaration to create.public java.lang.String popActorDeclaration()
throws PtalonScopeException
PtalonScopeException - If not inside an actor
declaration.public void pushActorDeclaration(java.lang.String actorName)
throws PtalonScopeException
actorName - The name of the actor.PtalonScopeException - If actorName is not a valid
parameter or import in the current scope.public void setActorParameter(java.lang.String paramName)
throws PtalonScopeException
paramName - The name of the parameter.PtalonScopeException - If not inside the scope of an
actor declaration.public void setActorSymbol(java.lang.String symbol)
throws PtalonScopeException
setActorSymbol in class AbstractPtalonEvaluatorsymbol - The name of this actor in the Ptalon file.PtalonScopeException - If the symbol has been added
already, or if there is some problem accessing its associated
file.public void setDanglingPortsOkay(boolean value)
value - true if dangling ports should be left alone.public void startAtTop()
startAtTop in class AbstractPtalonEvaluator