Module Simula

Class RemoteVariable


public final class RemoteVariable extends Expression
Remote Variable.
 
 Syntax:
 
   remote-variable = expression  DOT  variable
 
 
Link to GitHub: Source File.
Author:
Øystein Myhre Andersen
  • Field Details

    • remoteAttribute

      private Meaning remoteAttribute
      The remote attribute's semantic meaning.
    • callRemoteProcedure

      private ProcedureDeclaration callRemoteProcedure
      If the remoteAttribute is declared as a ProcedureDeclaration 'callRemoteProcedure' is the procedure to be called.
    • callRemoteVirtual

      private VirtualSpecification callRemoteVirtual
      If the remoteAttribute is declared as a VirtualSpecification 'callRemoteVirtual' is the procedure to be called.
    • obj

      final Expression obj
      The object expression
    • var

      final VariableExpression var
      The variable
    • accessRemoteArray

      private boolean accessRemoteArray
      Used to indicate access remote array. Set by doChecking.
  • Constructor Details

    • RemoteVariable

      RemoteVariable(Expression obj, VariableExpression var)
      Create a new RemoteVariable
      Parameters:
      obj - object expression
      var - the variable
  • Method Details

    • getWriteableVariable

      public VariableExpression getWriteableVariable()
      Description copied from class: Expression
      Get a writeable variable.

      This method is redefined in Variable, RemoteVariable and TypeConversion

      Overrides:
      getWriteableVariable in class Expression
      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 class SyntaxClass
    • doRemoteChecking

      private Type doRemoteChecking(Expression obj, Expression attr)
      Perform semantic checking
      Parameters:
      obj - remote object
      attr - remote attribute
      Returns:
      the attribute's type
    • doRemoteTextChecking

      private Type doRemoteTextChecking(Expression obj, Expression attr)
      Perform semantic checking
      Parameters:
      obj - remote object
      attr - 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 class Expression
      Returns:
      true if this expression may be used as a statement
    • toJavaCode

      public String toJavaCode()
      Description copied from class: SyntaxClass
      Generate Java code for this Syntax Class.
      Overrides:
      toJavaCode in class SyntaxClass
      Returns:
      Java code
    • doAccessRemoteArray

      private String doAccessRemoteArray(Expression beforeDot, VariableExpression array)
      Coding Utility: Edit remote array access.
      Parameters:
      beforeDot - expression before dot
      array - the array variable
      Returns:
      the resulting Java source code
    • toString

      public String toString()
      Overrides:
      toString in class Expression