java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.expression.Expression
simula.compiler.syntaxClass.expression.RemoteVariable
Remote Variable.
Syntax: remote-variable = expression DOT variableLink to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Used to indicate access remote array.private ProcedureDeclaration
If the remoteAttribute is declared as a ProcedureDeclaration 'callRemoteProcedure' is the procedure to be called.private VirtualSpecification
If the remoteAttribute is declared as a VirtualSpecification 'callRemoteVirtual' is the procedure to be called.(package private) final Expression
The object expressionprivate Meaning
The remote attribute's semantic meaning.(package private) final VariableExpression
The variableFields inherited from class simula.compiler.syntaxClass.expression.Expression
backLink, type
Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
lineNumber
-
Constructor Summary
ConstructorDescriptionRemoteVariable
(Expression obj, VariableExpression var) Create a new RemoteVariable -
Method Summary
Modifier and TypeMethodDescriptionprivate String
doAccessRemoteArray
(Expression beforeDot, VariableExpression array) Coding Utility: Edit remote array access.void
Perform semantic checking.private Type
doRemoteChecking
(Expression obj, Expression attr) Perform semantic checkingprivate Type
doRemoteTextChecking
(Expression obj, Expression attr) Perform semantic checkingGet a writeable variable.boolean
Returns true if this expression may be used as a statement.Generate Java code for this Syntax Class.toString()
Methods inherited from class simula.compiler.syntaxClass.expression.Expression
acceptExpression, checkCompatibility, evaluate, expectExpression, get, getInt, getNumber, getQualification, printTree, put
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED
-
Field Details
-
remoteAttribute
The remote attribute's semantic meaning. -
callRemoteProcedure
If the remoteAttribute is declared as a ProcedureDeclaration 'callRemoteProcedure' is the procedure to be called. -
callRemoteVirtual
If the remoteAttribute is declared as a VirtualSpecification 'callRemoteVirtual' is the procedure to be called. -
obj
The object expression -
var
The variable -
accessRemoteArray
private boolean accessRemoteArrayUsed to indicate access remote array. Set by doChecking.
-
-
Constructor Details
-
RemoteVariable
RemoteVariable(Expression obj, VariableExpression var) Create a new RemoteVariable- Parameters:
obj
- object expressionvar
- the variable
-
-
Method Details
-
getWriteableVariable
Description copied from class:Expression
Get a writeable variable.This method is redefined in Variable, RemoteVariable and TypeConversion
- Overrides:
getWriteableVariable
in classExpression
- Returns:
- a writeable variable or null
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.This must be redefined in every subclass.
- Overrides:
doChecking
in classSyntaxClass
-
doRemoteChecking
Perform semantic checking- Parameters:
obj
- remote objectattr
- remote attribute- Returns:
- the attribute's type
-
doRemoteTextChecking
Perform semantic checking- Parameters:
obj
- remote objectattr
- remote attribute- Returns:
- the attribute's type
-
maybeStatement
public boolean maybeStatement()Description copied from class:Expression
Returns true if this expression may be used as a statement.- Specified by:
maybeStatement
in classExpression
- Returns:
- true if this expression may be used as a statement
-
toJavaCode
Description copied from class:SyntaxClass
Generate Java code for this Syntax Class.- Overrides:
toJavaCode
in classSyntaxClass
- Returns:
- Java code
-
doAccessRemoteArray
Coding Utility: Edit remote array access.- Parameters:
beforeDot
- expression before dotarray
- the array variable- Returns:
- the resulting Java source code
-
toString
- Overrides:
toString
in classExpression
-