java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.statement.Statement
simula.compiler.syntaxClass.statement.ActivationStatement
Activation Statement.
Simula Standard: 12.2 Activation statement activation-statement = activator object-expression [ scheduling-part ] activator = ACTIVATE | REACTIVATE scheduling-part = AT arithmetic-expression [ PRIOR ] | DELAY arithmetic-expression [ PRIOR ] | BEFORE object-expression | AFTER object-expression The activation statement is defined by the procedure ACTIVAT in Simula Standard. In this implementation we use a set of methods for the same purpose: activate x; ==> ActivateDirect(false,x); activate x delay 1.34; ==> ActivateDelay(false,x,1.34f,false); activate x delay 1.34 prior; ==> ActivateDelay(false,x,1.34f,true); activate x at 13.7; ==> ActivateAt(false,x,13.7f,false); activate x at 13.7 prior; ==> ActivateAt(false,x,13.7f,true); activate x before y; ==> ActivateBefore(false,x,y); activate x after y; ==> ActivateAfter(false,x,y); reactivate x; ==> ActivateDirect(true,x); reactivate x delay 1.34; ==> ActivateDelay(true,x,1.34f,false); reactivate x delay 1.34 prior; ==> ActivateDelay(true,x,1.34f,true); reactivate x at 13.7; ==> ActivateAt(true,x,13.7f,false); reactivate x at 13.7 prior; ==> ActivateAt(true,x,13.7f,true); reactivate x before y; ==> ActivateBefore(true,x,y); reactivate x after y; ==> ActivateAfter(true,x,y); See runtime module RTS_Simulation for details.Link to GitHub: Source File.
- Author:
- SIMULA Standards Group, Øystein Myhre Andersen
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static enum
The activation code -
Field Summary
Modifier and TypeFieldDescriptionThe activation codeprivate Expression
First object-expression in activation statement.private Expression
Second object-expression in activation statement.private Boolean
Indicates that PRIOR is present in the activation statement.private final boolean
Indicates reactivation when true, otherwise activation.private Expression
The AT time expression.Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
lineNumber
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform semantic checking.private String
Edit (Re)Activate Process AFTER ...private String
Edit (Re)Activate Process AT ...private String
Edit (Re)Activate Process BEFORE ...private String
Edit (Re)Activate Process DELAY ...private String
Edit direct (re)activationvoid
printTree
(int indent) Utility print syntax tree method.Generate Java code for this Syntax Class.toString()
Methods inherited from class simula.compiler.syntaxClass.statement.Statement
doJavaCoding, expectStatement
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, doDeclarationCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED
-
Field Details
-
REAC
private final boolean REACIndicates reactivation when true, otherwise activation. -
object1
First object-expression in activation statement. -
object2
Second object-expression in activation statement. -
time
The AT time expression. -
prior
Indicates that PRIOR is present in the activation statement. -
code
The activation code
-
-
Constructor Details
-
ActivationStatement
ActivationStatement(int line) Create a new ActivationStatement.- Parameters:
line
- the source line number
-
-
Method Details
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.This must be redefined in every subclass.
- Overrides:
doChecking
in classSyntaxClass
-
toJavaCode
Description copied from class:SyntaxClass
Generate Java code for this Syntax Class.- Overrides:
toJavaCode
in classSyntaxClass
- Returns:
- Java code
-
edActivateDirect
Edit direct (re)activation- Returns:
- the resulting Java source code
-
edActivateAt
Edit (Re)Activate Process AT ...- Returns:
- the resulting Java source code
-
edActivateDelay
Edit (Re)Activate Process DELAY ...- Returns:
- the resulting Java source code
-
edActivateBefore
Edit (Re)Activate Process BEFORE ...- Returns:
- the resulting Java source code
-
edActivateAfter
Edit (Re)Activate Process AFTER ...- Returns:
- the resulting Java source code
-
printTree
public void printTree(int indent) Description copied from class:SyntaxClass
Utility print syntax tree method.- Overrides:
printTree
in classSyntaxClass
- Parameters:
indent
- number of spaces leading the lines
-
toString
-