Class Simula

java.lang.Object
simula.compiler.Simula

public final class Simula extends Object

Simula Main class containing the 'main' entry.

The Simula Compiler is normally activated through a command-line of this form:

	java -jar releaseHome\simula.jar

In this simple case the Simula Editor is started.

General Case:

In special rare situations you may use the general version of the command-line form:
	java [java-options] -jar releaseHome\simula.jar [simula-options] simula-sourceFile

Java-options are described in the relevant Java Technical Dokumentation.

Simula-sourceFile is the file containing the Simula text to be compiled and executed.

Possible simula-options include:

 -help                   Print this synopsis of standard options
 
 -caseSensitive          Source file is case sensitive. See next page.
 
 -compilerMode modeString   Simula Compiler mode. see below.
 
 -noexec                 Don't execute generated .jar file
 
 -nowarn                 Generate no warnings

 -noPopup                Don't create popUps at runtime");
 
 -noextension            Disable all language extensions.
                         In other words, follow the Simula Standard literally
                         
 -select characters      First, all selectors are reset.
                         Then, for each character, the corresponding selector is set
                         
 -verbose                Output messages about what the compiler is doing
 
 -keepJava directory     Specify where to place generated .java files
                         Default: Temp directory which is deleted upon exit
                         
 -output directory       Specify where to place generated executable .jar file
                         Default: Current workspace\bin
                         
 -extLib directory       Specify where to search for precompiled classes and
                         procedures. If not found, output directory is also searched.
                         
                         
 sourceFile ::= Simula Source File

 modeString ::= viaJavaSource | directClassFiles | simulaClassLoader


 viaJavaSource
    The Simula Compiler will generate Java source files and use
    the Java compiler to generate JavaClass files which in turn
    are collected together with the Runtime System into the
    resulting executable jar-file.


 directClassFiles
    The Simula Compiler will generate JavaClass files directly
    which in turn are collected together with the Runtime System
    into the resulting executable jar-file.
    No Java source files are generated.


 simulaClassLoader
    The Simula Compiler will generate ClassFile byte array and
    load it directly. No intermediate files are created.

    NOTE: In this mode, the editor will terminate after the first program execution

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
  • Constructor Details

    • Simula

      private Simula()
      Default constructor.
  • Method Details

    • help

      private static void help()
      Print synopsis of standard options
    • main

      public static void main(String[] argv)
      Main entry.
      Parameters:
      argv - arguments
    • setSelectors

      public static void setSelectors(String chars)

      Set selectors for conditional compilation.

      %SELECT select-character { select-character }

      Parameters:
      chars - select characters
    • setKeepJava

      private static void setKeepJava(String dir)

      Set keep .java files.

      Option: -keepJava Specify where to place generated .java files

      Parameters:
      dir - the .java output directory-
    • setOutputDir

      private static void setOutputDir(String dir)

      Set output directory.

      Option: -output Specify where to place generated executable .jar file

      Parameters:
      dir - the output directory-