Class StandardClass
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.declaration.Declaration
simula.compiler.syntaxClass.declaration.DeclarationScope
simula.compiler.syntaxClass.declaration.BlockDeclaration
simula.compiler.syntaxClass.declaration.ClassDeclaration
simula.compiler.syntaxClass.declaration.StandardClass
Standard Class.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Nested Class Summary
Nested classes/interfaces inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
ClassDeclaration.ClassParameterIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StandardClass
The Standard Class BASICIO.private static StandardClass
The Standard Class Bytefile.static StandardClass
The Standard Class CatchingErrors.(package private) static StandardClass
The Standard Class CLASS.private static StandardClass
The Standard Class Drawing.static StandardClass
The Standard Class ENVIRONMENT.private static StandardClass
The Standard Class File.private static StandardClass
The Standard Class Imagefile.static StandardClass
The Standard Class Infile.private static StandardClass
The Standard Class Linkage.static StandardClass
The Standard Class Printfile.private static StandardClass
The Standard Class Process.private static StandardClass
The Standard Class Simset.private static StandardClass
The Standard Class Simulation.static StandardClass
The type text.private static StandardClass
The Standard Class UNIVERSE.Fields inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
detachUsed, hiddenList, parameterList, prefix, prefixClass, protectedList, statements1, virtualMatchList, virtualSpecList
Fields inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
currentBlock, isContextFree, isMainModule, labelcodeList, labelContext, labelContextStack, lastLineNumber, nLocalVariables, prevBlock, statements
Fields inherited from class simula.compiler.syntaxClass.declaration.DeclarationScope
CLASSFILE_ALREADY_GENERATED, declarationList, hasLocalClasses, isPreCompiledFromFile, labelList, sourceBlockLevel, sourceFileName
Fields inherited from class simula.compiler.syntaxClass.declaration.Declaration
declarationKind, declaredIn, externalIdent, identifier, isProtected, type
Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
CHECKED, lineNumber, OBJECT_SEQU
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructor used by Attribute File I/Oprivate
StandardClass
(String className) Create a new StandardClass.private
StandardClass
(String prefix, String className) Create a new StandardClass.private
StandardClass
(String prefix, String className, Parameter... param) Create a new StandardClass. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addStandardAttribute
(Type type, String ident) Create and add a new standard attribute.private void
addStandardAttribute
(Type type, String ident, Number value) Create and add a new constant standard attribute.private void
addStandardClass
(StandardClass standardClass) Add a StandardClass.private void
addStandardProcedure
(int kind, String[] mtdSet, Type type, String ident, Parameter... param) Create and add a new StandardProcedure.private void
addStandardProcedure
(int kind, Type type, String ident) Create and add a new StandardProcedure.private void
addStandardProcedure
(int kind, Type type, String ident, Parameter... param) Create and add a new StandardProcedure.Utility to edit JavaClass'NamefindRemoteAttributeMeaning
(String ident) Find Remote Attribute's Meaning.Find visible attribute's MeaningReturn the ClassDescint
Utility: Get Runtime BlockLevel.private static void
Initiate the Standard Class BASICIO.private static void
Initiate the Standard Class Bytefile.private static void
Initiate the Standard Class CatchingErrors.private static void
Initiate the Standard Class CLASS.private static void
Initiate the Standard Class DEC_Lib.private static void
Initiate the Standard Class Directbytefile.private static void
Initiate the Standard Class Directfile.private static void
Initiate the Standard Class Drawing.private static void
Initiate the Standard Class ENVIRONMENT.private static void
Initiate the Standard Class EVENT_NOTICE.private static void
initFile()
Initiate the Standard Class File.private static void
initHead()
Initiate the Standard Class Head.static void
INITIATE()
Method to initiate all standard classes.private static void
Initiate the Standard Class Imagefile.private static void
Initiate the Standard Class Inbytefile.private static void
Initiate the Standard Class Infile.private static void
initLink()
Initiate the Standard Class Link.private static void
Initiate the Standard Class Linkage.private static void
Initiate the Standard Class MAIN_PROGRAM.private static void
Initiate the Standard Class Outbytefile.private static void
Initiate the Standard Class Outfile.private static void
Initiate the Standard Class Printfile.private static void
Initiate the Standard Class Process.private static void
Initiate the Standard Class RTObject.private static void
Initiate the Standard Class ShapeElement.private static void
Initiate the Standard Class Simset.private static void
Initiate the Standard Class Simulation.private static void
Initiate the Standard Class TextElement.private static void
Initiate the The Type Text.private static void
Initiate the Standard Class UNIVERSEprivate static Parameter
Create a new Parameter.private static Parameter
Create a new Parameter.private static Parameter
Create a new Parameter.private static Parameter
Create a new Parameter.private static Parameter
Create a new Parameter.Methods inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
build_STM_BODY, buildAndLoadOrAddClassFile, buildClassFile, buildConstructor, buildDeclaration, buildInitAttribute, codeClassStatements, codeStatements, doChecking, doJavaCoding, edCompleteParameterList, edConstructorSignature, edFormalParameterList, expectClassDeclaration, findLocalAttribute, findLocalProcedure, getPrefixClass, hasRealPrefix, isDetachUsed, isSubClassOf, parameterIterator, prefixLevel, print, printTree, readObject, searchHiddenList, searchProtectedList, searchVirtualSpecList, superClassDesc, toString, writeObject
Methods inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
addLeadingLabel, allocateLocalVariable, build_TRY_CATCH, buildIsMethodDetachUsed, buildIsQPSystemBlock, buildMethod_STM, buildMethodMain, codeMethodMain, codeSTMBody, currentClassDesc, expectFormalParameterPart, getConstructorMethodTypeDesc, hasAccumLabel, hasDeclaredLabel, isBlockWithLocalClasses, isQPSystemBlock, nearestEnclosingBlock, printStatementList
Methods inherited from class simula.compiler.syntaxClass.declaration.DeclarationScope
buildCTX, buildCTX, buildCTX2, createJavaClassFile, doBuildClassFile, edCTX, edCTX, edScope, edScopeChain, findLabelMeaning, findMeaning, findProcedure, getBytesFromFile, loadOrAddClassFile, modifyIdentifier, prep, printDeclarationList, printStaticChain, scopeID
Methods inherited from class simula.compiler.syntaxClass.declaration.Declaration
acceptDeclaration, buildDeclarationCode, checkAlreadyDefined, getFieldIdentifier, getJavaIdentifier, isCompatibleClasses, verifyTree
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, buildByteCode, doDeclarationCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, SET_SEMANTICS_CHECKED, setLineNumber, toJavaCode
-
Field Details
-
typeText
The type text. -
ENVIRONMENT
The Standard Class ENVIRONMENT. -
BASICIO
The Standard Class BASICIO. -
CLASS
The Standard Class CLASS. -
Infile
The Standard Class Infile. -
Printfile
The Standard Class Printfile. -
CatchingErrors
The Standard Class CatchingErrors. -
UNIVERSE
The Standard Class UNIVERSE. -
File
The Standard Class File. -
Imagefile
The Standard Class Imagefile. -
Bytefile
The Standard Class Bytefile. -
Simset
The Standard Class Simset. -
Linkage
The Standard Class Linkage. -
Simulation
The Standard Class Simulation. -
Process
The Standard Class Process. -
Drawing
The Standard Class Drawing.
-
-
Constructor Details
-
StandardClass
Create a new StandardClass.- Parameters:
className
- the class's name
-
StandardClass
-
StandardClass
-
StandardClass
public StandardClass()Default constructor used by Attribute File I/O
-
-
Method Details
-
edJavaClassName
Description copied from class:DeclarationScope
Utility to edit JavaClass'Name- Overrides:
edJavaClassName
in classDeclarationScope
- Returns:
- the edited JavaClass'Name
-
INITIATE
public static void INITIATE()Method to initiate all standard classes. -
initTypeText
private static void initTypeText()Initiate the The Type Text. -
initUNIVERSE
private static void initUNIVERSE()Initiate the Standard Class UNIVERSE -
initRTObject
private static void initRTObject()Initiate the Standard Class RTObject. -
initENVIRONMENT
private static void initENVIRONMENT()Initiate the Standard Class ENVIRONMENT. -
initBASICIO
private static void initBASICIO()Initiate the Standard Class BASICIO.
ENVIRONMENT class BASICIO (INPUT_LINELENGTH, OUTPUT_LINELENGTH); integer INPUT_LINELENGTH, OUTPUT_LINELENGTH; begin ref (Infile) SYSIN; ref (Printfile) SYSOUT; ref (Infile) procedure sysin; sysin :- SYSIN; ref (Printfile) procedure sysout; sysout :- SYSOUT; procedure terminate_program; begin ... ; goto STOP end terminate_program; class File File class Imagefile File class Bytefile Imagefile class Infile Imagefile class Outfile Imagefile class Directfile Outfile class Printfile Bytefile class Inbytefile Bytefile class Outbytefile Bytefile class Directbytefile SYSIN :- new Infile("..."); ! Implementation-defined SYSOUT :- new Printfile("..."); ! files names; SYSIN.open(blanks(INPUT_LINELENGTH)); SYSOUT.open(blanks(OUTPUT_LINELENGTH)); inner; STOP: SYSIN.close; SYSOUT.close end BASICIO;
-
initCLASS
private static void initCLASS()Initiate the Standard Class CLASS.
Simula Stadard States: Fictituous outermost prefix Any class that has no (textually given) prefix is by definition prefixed by a fictitious class whose only attribute is:
procedure detach; ... ; (see 7.3.1)
Thus every class object or instance of a prefixed block has this attribute.
-
initFile
private static void initFile()Initiate the Standard Class File.
class File(FILENAME); value FILENAME; text FILENAME; begin Boolean OPEN_; text procedure filename; filename:=copy(FILENAME); Boolean procedure isopen; isopen:=OPEN_; Boolean procedure setaccess(mode); text mode; ... ; if FILENAME = notext then error("Illegal File Name"); end File;
-
initImagefile
private static void initImagefile()Initiate the Standard Class Imagefile.
File class Imagefile; begin text image; procedure setpos(i); integer i; image.setpos(i); integer procedure pos; pos := image.pos; Boolean procedure more; more := image.more; integer procedure length; length := image.length; end Imagefile;
-
initInfile
private static void initInfile()Initiate the Standard Class Infile.
Imagefile class Infile; begin Boolean ENDFILE; Boolean procedure endfile; endfile:= ENDFILE; Boolean procedure open(fileimage); text fileimage; Boolean procedure close; procedure inimage; Boolean procedure inrecord; character procedure inchar; Boolean procedure lastitem; text procedure intext(w); integer w; integer procedure inint; long real procedure inreal; integer procedure infrac; ENDFILE:= true ... end Infile;
-
initOutfile
private static void initOutfile()Initiate the Standard Class Outfile.
Imagefile class Outfile; begin Boolean procedure open(fileimage); text fileimage; Boolean procedure close; procedure outimage; procedure outrecord; procedure breakoutimage; Boolean procedure checkpoint; procedure outchar(c); character c; procedure outtext(t); text t; text procedure FIELD(w); integer w; procedure outint(i,w); integer i,w; procedure outfix(r,n,w); long real r; integer n,w; procedure outreal(r,n,w); long real r; integer n,w; procedure outfrac(i,n,w); integer i,n,w; ... ; end Outfile;
-
initDirectfile
private static void initDirectfile()Initiate the Standard Class Directfile.
Imagefile class Directfile; begin integer LOC, MAXLOC; Boolean ENDFILE, LOCKED; integer procedure location; location:= LOC; Boolean procedure endfile; endfile := ENDFILE; Boolean procedure locked; locked := LOCKED; Boolean procedure open(fileimage); text fileimage; Boolean procedure close; integer procedure lastloc; integer procedure maxloc; procedure locate(i); integer i; procedure inimage; procedure outimage; Boolean procedure deleteimage; character procedure inchar; integer procedure lock(t,i,j); real t; integer i,j; Boolean procedure unlock; Boolean procedure checkpoint; Boolean procedure lastitem; text procedure intext; integer procedure inint; long real procedure inreal; integer procedure infrac; procedure outchar(c); character c; procedure outtext(t); text t; text procedure FIELD(w); integer w; procedure outint(i,w); integer i,w; procedure outfix(r,n,w); long real r; integer n,w; procedure outreal(r,n,w); long real r; integer n,w; procedure outfrac(i,n,w); integer i,n,w; ENDFILE:= true ... end Directfile;
-
initPrintfile
private static void initPrintfile()Initiate the Standard Class Printfile.
Outfile class Printfile; begin integer LINE, LINES_PER_PAGE, SPACING, PAGE; integer procedure line; line := LINE; integer procedure page; page := PAGE; Boolean procedure open(fileimage); text fileimage; Boolean procedure close; integer procedure linesperpage(n); integer n; procedure spacing(n); integer n; procedure eject(n); integer n; procedure outimage; procedure outrecord; SPACING := 1; LINES_PER_PAGE := ... ; ... end Printfile;
-
initBytefile
private static void initBytefile()Initiate the Standard Class Bytefile.
file class Bytefile; begin short integer BYTESIZE; short integer procedure bytesize; bytesize := BYTESIZE; end Bytefile;
-
initInbytefile
private static void initInbytefile()Initiate the Standard Class Inbytefile.
Bytefile class Inbytefile; begin Boolean ENDFILE; Boolean procedure endfile; endfile:= ENDFILE; Boolean procedure open; Boolean procedure close; short integer procedure inbyte; text procedure intext(t); text t; ENDFILE:= true; ... end Inbytefile;
-
initOutbytefile
private static void initOutbytefile()Initiate the Standard Class Outbytefile.
Bytefile class Outbytefile; begin Boolean procedure open; Boolean procedure close; procedure outbyte(x); short integer x; procedure outtext(t); text t; Boolean procedure checkpoint; end Outbytefile;
-
initDirectbytefile
private static void initDirectbytefile()Initiate the Standard Class Directbytefile.
Bytefile class Directbytefile; begin integer LOC, MAXLOC; Boolean LOCKED; Boolean procedure endfile; endfile:=OPEN and then LOC>lastloc; integer procedure location; location := LOC; integer procedure maxloc; maxloc := MAXLOC; Boolean procedure locked; locked := LOCKED; Boolean procedure open; Boolean procedure close; integer procedure lastloc; procedure locate(i); integer i; short integer procedure inbyte; procedure outbyte(x); short integer x; Boolean procedure checkpoint; integer procedure lock(t,i,j); real t; integer i,j; Boolean procedure unlock; procedure intext(t); text t; procedure outtext(t); text t; ... end Directbytefile;
-
initSimset
private static void initSimset()Initiate the Standard Class Simset. -
initLinkage
private static void initLinkage()Initiate the Standard Class Linkage. -
initHead
private static void initHead()Initiate the Standard Class Head. -
initLink
private static void initLink()Initiate the Standard Class Link. -
initSimulation
private static void initSimulation()Initiate the Standard Class Simulation. -
initEVENT_NOTICE
private static void initEVENT_NOTICE()Initiate the Standard Class EVENT_NOTICE. -
initProcess
private static void initProcess()Initiate the Standard Class Process. -
initMAIN_PROGRAM
private static void initMAIN_PROGRAM()Initiate the Standard Class MAIN_PROGRAM. -
initCatchingErrors
private static void initCatchingErrors()Initiate the Standard Class CatchingErrors. -
initDEC_Lib
private static void initDEC_Lib()Initiate the Standard Class DEC_Lib. -
initDrawing
private static void initDrawing()Initiate the Standard Class Drawing. -
initShapeElement
private static void initShapeElement()Initiate the Standard Class ShapeElement. -
initTextElement
private static void initTextElement()Initiate the Standard Class TextElement. -
getRTBlockLevel
public int getRTBlockLevel()Description copied from class:DeclarationScope
Utility: Get Runtime BlockLevel.- Overrides:
getRTBlockLevel
in classDeclarationScope
- Returns:
- true: the Runtime BlockLevel.
-
findVisibleAttributeMeaning
Description copied from class:DeclarationScope
Find visible attribute's Meaning- Overrides:
findVisibleAttributeMeaning
in classClassDeclaration
- Parameters:
ident
- attribute identifier- Returns:
- the resulting Meaning
-
findRemoteAttributeMeaning
Description copied from class:ClassDeclaration
Find Remote Attribute's Meaning.- Overrides:
findRemoteAttributeMeaning
in classClassDeclaration
- Parameters:
ident
- attribute identifier- Returns:
- the resulting Meaning
-
parameter
-
parameter
-
parameter
-
parameter
-
parameter
-
addStandardClass
Add a StandardClass.- Parameters:
standardClass
- the StandardClass
-
addStandardAttribute
-
addStandardAttribute
-
addStandardProcedure
-
addStandardProcedure
-
addStandardProcedure
private void addStandardProcedure(int kind, String[] mtdSet, Type type, String ident, Parameter... param) Create and add a new StandardProcedure.- Parameters:
kind
- the declaration kindmtdSet
- the set of Method Type Descriptorstype
- the procedure's typeident
- the procedure identifierparam
- the parameters
-
getClassDesc
Description copied from class:DeclarationScope
Return the ClassDesc- Overrides:
getClassDesc
in classDeclarationScope
- Returns:
- the ClassDesc
-