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
- All Implemented Interfaces:
Externalizable
,Serializable
Standard Class.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
ClassDeclaration.ClassParameterIterator
Nested classes/interfaces inherited from class simula.compiler.syntaxClass.declaration.Declaration
Declaration.Kind
-
Field Summary
Modifier and TypeFieldDescriptionstatic StandardClass
The Standard Class BASICIO.private static StandardClass
The Standard Class Bytefile(package private) static StandardClass
The Standard Class CLASS.private static StandardClass
The Standard Class Drawingstatic StandardClass
The Standard Class ENVIRONMENT.private static StandardClass
The Standard Class Fileprivate static StandardClass
The Standard Class Imagefilestatic StandardClass
The Standard Class Infile.private static StandardClass
The Standard Class Linkagestatic StandardClass
The Standard Class Printfile.private static StandardClass
The Standard Class Processprivate static StandardClass
The Standard Class Simsetprivate static StandardClass
The Standard Class Simulationstatic StandardClass
The type text.private static StandardClass
The Standard Class UNIVERSEFields inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
code1, code2, detachUsed, hiddenList, parameterList, prefix, protectedList, virtualMatchList, virtualSpecList
Fields inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
isContextFree, isMainModule, isPreCompiled, labelcodeList, lastLineNumber, statements
Fields inherited from class simula.compiler.syntaxClass.declaration.DeclarationScope
ctBlockLevel, currentRTBlockLevel, declarationList, hasLocalClasses, labelList, rtBlockLevel, sourceBlockLevel
Fields inherited from class simula.compiler.syntaxClass.declaration.Declaration
declarationKind, declaredIn, externalIdent, identifier, isProtected, type
Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
lineNumber
-
Constructor Summary
ModifierConstructorDescriptionDefault constructor used by Externalization.private
StandardClass
(String className) Create a new StandardClassprivate
StandardClass
(String prefix, String className) Create a new StandardClassprivate
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 attributeprivate void
addStandardAttribute
(Type type, String ident, int iValue) Create and add a new constant standard attributeprivate void
addStandardClass
(StandardClass standardClass) Add a StandardClassprivate void
addStandardProcedure
(Declaration.Kind kind, Type type, String ident) Create and add a new StandardProcedureprivate void
addStandardProcedure
(Declaration.Kind kind, Type type, String ident, Parameter... param) Create and add a new StandardProcedureUtility to hold a set of Java code linesUtility to edit JavaClass'NamefindRemoteAttributeMeaning
(String ident) Find Remote Attribute's Meaning.Find visible attribute's Meaningprivate static void
Initiate the Standard Class BASICIOprivate static void
Initiate the Standard Class Bytefileprivate static void
Initiate the Standard Class CatchingErrorsprivate static void
Initiate the Standard Class CLASSprivate static void
Initiate the Standard Class DEC_Libprivate static void
Initiate the Standard Class Directbytefileprivate static void
Initiate the Standard Class Directfileprivate static void
Initiate the Standard Class Drawingprivate static void
Initiate the Standard Class ENVIRONMENTprivate static void
Initiate the Standard Class EVENT_NOTICEprivate static void
initFile()
Initiate the Standard Class Fileprivate static void
initHead()
Initiate the Standard Class Headstatic void
INITIATE()
Method to initiate all standard classes.private static void
Initiate the Standard Class Imagefileprivate static void
Initiate the Standard Class Inbytefileprivate static void
Initiate the Standard Class Infileprivate static void
initLink()
Initiate the Standard Class Linkprivate static void
Initiate the Standard Class Linkageprivate static void
Initiate the Standard Class MAIN_PROGRAMprivate static void
Initiate the Standard Class Outbytefileprivate static void
Initiate the Standard Class Outfileprivate static void
Initiate the Standard Class Printfileprivate static void
Initiate the Standard Class Processprivate static void
Initiate the Standard Class RTObjectprivate static void
Initiate the Standard Class ShapeElementprivate static void
Initiate the Standard Class Simsetprivate static void
Initiate the Standard Class Simulationprivate static void
Initiate the Standard Class TextElementprivate static void
Initiate the The Type Textprivate static void
Initiate the Standard Class UNIVERSEprivate static Parameter
parameter
(String ident, Parameter.Kind kind, Parameter.Mode mode, Type type) Create a new Parameterprivate static Parameter
parameter
(String ident, Parameter.Mode mode, Type type) Create a new Parameterprivate static Parameter
Create a new Parameterprivate static Parameter
parameter
(String ident, Type type, Parameter.Kind kind) Create a new Parameterprivate static Parameter
parameter
(String ident, Type type, Parameter.Kind kind, int nDim) Create a new ParameterMethods inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
codeClassStatements, codeStatements, doChecking, doJavaCoding, edCompleteParameterList, edFormalParameterList, expectClassDeclaration, findLocalAttribute, findLocalProcedure, getNlabels, getPrefixClass, hasLabel, isDetachUsed, isSubClassOf, parameterIterator, prefixLevel, print, printTree, readExternal, searchHiddenList, searchProtectedList, searchVirtualSpecList, toString, writeCode1, writeCode2, writeExternal
Methods inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
addLeadingLabel, codeSTMBody, doCheckLabelList, expectFormalParameterPart, isBlockWithLocalClasses, isQPSystemBlock, printStatementList
Methods inherited from class simula.compiler.syntaxClass.declaration.DeclarationScope
edCTX, edCTX, edScopeChain, findLabelMeaning, findMeaning, findProcedure, printDeclarationList, scopeID
Methods inherited from class simula.compiler.syntaxClass.declaration.Declaration
getJavaIdentifier, isCompatibleClasses, modifyIdentifier, parseDeclaration
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, doDeclarationCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, SET_SEMANTICS_CHECKED, 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. -
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
Create a new StandardClass- Parameters:
prefix
- prefix class-identifierclassName
- the class's name
-
StandardClass
Create a new StandardClass- Parameters:
prefix
- prefix class-identifierclassName
- the class's nameparam
- the parameters
-
StandardClass
public StandardClass()Default constructor used by Externalization.
-
-
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 BASICIOENVIRONMENT 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 CLASSSimula 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 Fileclass 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 ImagefileFile 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 InfileImagefile 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 OutfileImagefile 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 DirectfileImagefile 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 PrintfileOutfile 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 Bytefilefile class Bytefile; begin short integer BYTESIZE; short integer procedure bytesize; bytesize := BYTESIZE; end Bytefile;
-
initInbytefile
private static void initInbytefile()Initiate the Standard Class InbytefileBytefile 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 OutbytefileBytefile 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 DirectbytefileBytefile 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 -
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
-
codeSet
Utility to hold a set of Java code lines- Parameters:
codeLine
- a sequence of Java code lines- Returns:
- the resulting set of Java code lines
-
parameter
Create a new Parameter- Parameters:
ident
- the identifiertype
- the type- Returns:
- the newly created Parameter
-
parameter
Create a new Parameter- Parameters:
ident
- the identifiertype
- the typekind
- the parameter kind- Returns:
- the newly created Parameter
-
parameter
Create a new Parameter- Parameters:
ident
- the identifiertype
- the typekind
- the parameter kindnDim
- number of dimensions for arrays- Returns:
- the newly created Parameter
-
parameter
Create a new Parameter- Parameters:
ident
- the identifiermode
- the modetype
- the type- Returns:
- the newly created Parameter
-
parameter
private static Parameter parameter(String ident, Parameter.Kind kind, Parameter.Mode mode, Type type) Create a new Parameter- Parameters:
ident
- the identifierkind
- the parameter kindmode
- the modetype
- the type- Returns:
- the newly created Parameter
-
addStandardClass
Add a StandardClass- Parameters:
standardClass
- the StandardClass
-
addStandardAttribute
Create and add a new standard attribute- Parameters:
type
- the attribute typeident
- the attribute identifier
-
addStandardAttribute
Create and add a new constant standard attribute- Parameters:
type
- the attribute typeident
- the attribute identifieriValue
- the constant integer value
-
addStandardProcedure
Create and add a new StandardProcedure- Parameters:
kind
- the declaration kindtype
- the procedure's typeident
- the procedure identifier
-
addStandardProcedure
private void addStandardProcedure(Declaration.Kind kind, Type type, String ident, Parameter... param) Create and add a new StandardProcedure- Parameters:
kind
- the declaration kindtype
- the procedure's typeident
- the procedure identifierparam
- the parameters
-