Class Global
java.lang.Object
simula.compiler.utilities.Global
Global Variables.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Charset
The current Charset.static ConsolePanel
The consolestatic JavaSourceFileCoder
Current Java output Module.private static DeclarationScope
Current declaration scope.static File
Current workspace.static boolean
Compiler state: True while Checkingstatic boolean
Compiler state: True while Parsingstatic boolean
Compiler state: True while generating STM codeThe set of external .jar files.static File
The external library.static LinkedList
<JarFile> The Jar files queued for later inclusion.static String
The insert name.static JarFileBuilder
The .jar File Builderstatic Vector
<JavaSourceFileCoder> The set of Java SourceFile Coders.static int
Next available Object Sequence Number.static File
The output directory.static String
Packet name used in generated .java files.static ProgramModule
The programModule.static File
The Simula Release Home directory.static File
The sample source directory.private static Stack
<DeclarationScope> The declaration scope stack.(package private) static ImageIcon
A small Simula iconstatic ImageIcon
A Simula iconstatic SimulaClassLoader
The Simula ClassLoader.static File
The Simula Home directory.private static Properties
The Simula propertiesstatic File
The Simula properties filestatic final String
The Simula release identification.static File
Where to find the Simula Runtime System.static File
The Simula temp directorystatic String
The Simula Versionprivate static Properties
The Simula workspace properties.private static File
The Simula workspace .xml file.static File
The source file's directory.static String
The source file name.static int
The current source line number.static String
The source file name without .simstatic File
Temp directory for generated .class filesstatic File
Temp directory for generated .java filesstatic ArrayDeque
<File> The set of workspaces -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
enterScope
(DeclarationScope scope) During Checking and Coding: Enter declaration scope.static void
During Checking and Coding: Exit declaration scope.static DeclarationScope
Returns the current scope.static String
getSimulaProperty
(String key, String defaultValue) Returns a Simula property.static File
getTempFileDir
(String subDir) Returns a temp file directory.static void
initiate()
Initiate Global variables.static void
Initiate Simula properties.private static void
Load Simula properties.static void
Load Workspace properties.private static void
setAccessRWX
(File dir) Utility: Set read-write-execute access on a directorystatic void
setCurrentWorkspace
(File workspace) Set current Workspace.static void
setScope
(DeclarationScope scope) During Parsing: Set current scope.static void
Store Workspace properties.static void
trySetOutputDir
(File dir) Try set Global.outputDir
-
Field Details
-
simulaReleaseID
The Simula release identification.
NOTE: When updating release id, change version in SimulaExtractor and RuntimeSystem
- See Also:
-
simIcon
A Simula icon -
sIcon
A small Simula icon -
simulaHome
The Simula Home directory. -
releaseHome
The Simula Release Home directory. -
simulaVersion
The Simula Version -
externalJarFiles
-
_CHARSET
The current Charset. -
sourceLineNumber
public static int sourceLineNumberThe current source line number. -
sourceFileDir
The source file's directory. -
sourceFileName
The source file name. -
sourceName
The source file name without .sim -
insertName
The insert name. -
programModule
The programModule. -
simulaRtsLib
Where to find the Simula Runtime System. -
simulaPropertiesFile
The Simula properties file -
simulaProperties
The Simula properties -
sampleSourceDir
The sample source directory. Where to find sample Simula files -
currentWorkspace
Current workspace. Where to find .sim source files -
workspaces
The set of workspaces -
outputDir
The output directory. Used by Java-Coding to save the generated .jar files. -
extLib
The external library. Used by ExternalDeclaration.readAttributeFile -
duringParsing
public static boolean duringParsingCompiler state: True while Parsing -
duringChecking
public static boolean duringCheckingCompiler state: True while Checking -
duringSTM_Coding
public static boolean duringSTM_CodingCompiler state: True while generating STM code -
jarFileBuilder
The .jar File Builder -
simulaTempDir
The Simula temp directory -
tempJavaFileDir
Temp directory for generated .java files -
tempClassFileDir
Temp directory for generated .class files -
Object_SEQU
public static int Object_SEQUNext available Object Sequence Number. -
simulaClassLoader
The Simula ClassLoader. -
packetName
Packet name used in generated .java files. NOTE: Must be a single identifier. -
currentJavaFileCoder
Current Java output Module. Maintained by JavaModule during Java Coding -
javaSourceFileCoders
The set of Java SourceFile Coders. -
console
The console -
includeQueue
The Jar files queued for later inclusion. See: JarFileBuilder for details. -
scopeStack
The declaration scope stack. -
currentScope
Current declaration scope. Maintained during Checking and Coding -
simulaWorkspacesFile
The Simula workspace .xml file. -
simulaWorkspaces
The Simula workspace properties.
-
-
Constructor Details
-
Global
Global()Default constructor.
-
-
Method Details
-
initiate
public static void initiate()Initiate Global variables. -
getCurrentScope
Returns the current scope.- Returns:
- the current scope
-
setScope
During Parsing: Set current scope.- Parameters:
scope
- the new scope
-
enterScope
During Checking and Coding: Enter declaration scope.- Parameters:
scope
- the new current scope
-
exitScope
public static void exitScope()During Checking and Coding: Exit declaration scope. -
getTempFileDir
-
setAccessRWX
Utility: Set read-write-execute access on a directory- Parameters:
dir
- the directory
-
trySetOutputDir
-
initSimulaProperties
public static void initSimulaProperties()Initiate Simula properties. -
getSimulaProperty
-
loadProperties
private static void loadProperties()Load Simula properties. -
loadWorkspaceProperties
public static void loadWorkspaceProperties()Load Workspace properties. -
setCurrentWorkspace
Set current Workspace.- Parameters:
workspace
- the workspace
-
storeWorkspaceProperties
public static void storeWorkspaceProperties()Store Workspace properties.
-