Module Simula

Class PrefixedBlockDeclaration

All Implemented Interfaces:
Externalizable, Serializable

public final class PrefixedBlockDeclaration extends ClassDeclaration
Prefixed Block Declaration.
 Simula Standard: 4.10.1 Prefixed blocks

  prefixed-block = block-prefix main-block
  
     block-prefix = class-identifier [ actual-parameter-part ]
     
     main-block
        = block
        | compound-statement
        
       actual-parameter-part = "(" actual-parameter { , actual-parameter } ")"
       
          actual-parameter = expression
                           | array-identifier-1
                           | switch-identifier
                           | procedure-identifier-1
          
          compound-statement = BEGIN statement { ; statement } END

 
Link to GitHub: Source File.
Author:
SIMULA Standards Group, Øystein Myhre Andersen
See Also:
  • Field Details

  • Constructor Details

    • PrefixedBlockDeclaration

      private PrefixedBlockDeclaration(VariableExpression blockPrefix, boolean isMainModule)
      PrefixedBlock.
      Parameters:
      blockPrefix - the block prefix
      isMainModule - true if this block is the main program module.
  • Method Details

    • expectPrefixedBlock

      public static PrefixedBlockDeclaration expectPrefixedBlock(VariableExpression blockPrefix, boolean isMainModule)
      Parse Utility: Expect PrefixedBlockDeclaration
      Parameters:
      blockPrefix - the block prefix
      isMainModule - true if main module
      Returns:
      the resulting PrefixedBlockDeclaration
    • doChecking

      public void doChecking()
      Description copied from class: SyntaxClass
      Perform semantic checking.

      This must be redefined in every subclass.

      Overrides:
      doChecking in class ClassDeclaration
    • doJavaCoding

      public void doJavaCoding()
      Description copied from class: SyntaxClass
      Output Java code.
      Overrides:
      doJavaCoding in class ClassDeclaration
    • doCodeConstructor

      private void doCodeConstructor()
      Coding Utility: Code the constructor.
    • print

      public void print(int indent)
      Description copied from class: SyntaxClass
      Utility print method.
      Overrides:
      print in class ClassDeclaration
      Parameters:
      indent - number of spaces leading the line
    • printTree

      public void printTree(int indent)
      Description copied from class: SyntaxClass
      Utility print syntax tree method.
      Overrides:
      printTree in class ClassDeclaration
      Parameters:
      indent - number of spaces leading the lines
    • toString

      public String toString()
      Overrides:
      toString in class ClassDeclaration