Module Simula

Class ProgramModule


public final class ProgramModule extends Statement
Simula Program Module.

Link to GitHub: Source File.

 
 Simula Standard: Chapter 6 Program Modules

      SIMULA-source-module
         = [ external-head ] ( program | procedure-declaration | class-declaration )
         
         external-head = external-declaration ; { external-declaration ; }
         
            external-declaration = external-procedure-declaration | external-class-declaration
            
                        program = [ block-prefix ] block | [ block-prefix ] compound-statement
 
                                block-prefix = class-identifier [ ( actual-parameter-part ) ]

                        procedure-declaration
                             = [ type ] PROCEDURE procedure-identifier procedure-head procedure-body

 
Author:
SIMULA Standards Group, Øystein Myhre Andersen
  • Field Details

  • Constructor Details

    • ProgramModule

      public ProgramModule()
      Create a new ProgramModule.
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Returns the module identifier.
      Returns:
      the module identifier
    • getRelativeAttributeFileName

      public String getRelativeAttributeFileName()
      Returns the relative file name.
      Returns:
      the relative file name
    • isExecutable

      public boolean isExecutable()
      Returns true if this program module is executable.
      Returns:
      true if this program module is executable
    • doChecking

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

      This must be redefined in every subclass.

      Overrides:
      doChecking in class SyntaxClass
    • doJavaCoding

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

      public void print(int indent)
      Description copied from class: SyntaxClass
      Utility print method.
      Overrides:
      print in class SyntaxClass
      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 SyntaxClass
      Parameters:
      indent - number of spaces leading the lines
    • toString

      public String toString()
      Overrides:
      toString in class Object