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.PrefixedBlockDeclaration
- All Implemented Interfaces:
Externalizable
,Serializable
Prefixed Block Declaration.
Simula Standard: 4.10.1 Prefixed blocks prefixed-block = block-prefix main-block block-prefix = class-identifier [ actual-parameter-part ] main-block = block | compound-statement actual-parameter-part = "(" actual-parameter { , actual-parameter } ")" actual-parameter = expression | array-identifier-1 | switch-identifier | procedure-identifier-1 compound-statement = BEGIN statement { ; statement } ENDLink to GitHub: Source File.
- Author:
- SIMULA Standards Group, Ø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
Fields 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
ModifierConstructorDescriptionprivate
PrefixedBlockDeclaration
(VariableExpression blockPrefix, boolean isMainModule) PrefixedBlock. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform semantic checking.private void
Coding Utility: Code the constructor.void
Output Java code.static PrefixedBlockDeclaration
expectPrefixedBlock
(VariableExpression blockPrefix, boolean isMainModule) Parse Utility: Expect PrefixedBlockDeclarationvoid
print
(int indent) Utility print method.void
printTree
(int indent) Utility print syntax tree method.toString()
Methods inherited from class simula.compiler.syntaxClass.declaration.ClassDeclaration
codeClassStatements, codeStatements, edCompleteParameterList, edFormalParameterList, expectClassDeclaration, findLocalAttribute, findLocalProcedure, findRemoteAttributeMeaning, findVisibleAttributeMeaning, getNlabels, getPrefixClass, hasLabel, isDetachUsed, isSubClassOf, parameterIterator, prefixLevel, readExternal, searchHiddenList, searchProtectedList, searchVirtualSpecList, 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, edJavaClassName, 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
-
blockPrefix
The block prefix.
-
-
Constructor Details
-
PrefixedBlockDeclaration
PrefixedBlock.- Parameters:
blockPrefix
- the block prefixisMainModule
- true if this block is the main program module.
-
-
Method Details
-
expectPrefixedBlock
public static PrefixedBlockDeclaration expectPrefixedBlock(VariableExpression blockPrefix, boolean isMainModule) Parse Utility: Expect PrefixedBlockDeclaration- Parameters:
blockPrefix
- the block prefixisMainModule
- true if main module- Returns:
- the resulting PrefixedBlockDeclaration
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.This must be redefined in every subclass.
- Overrides:
doChecking
in classClassDeclaration
-
doJavaCoding
public void doJavaCoding()Description copied from class:SyntaxClass
Output Java code.- Overrides:
doJavaCoding
in classClassDeclaration
-
doCodeConstructor
private void doCodeConstructor()Coding Utility: Code the constructor. -
print
public void print(int indent) Description copied from class:SyntaxClass
Utility print method.- Overrides:
print
in classClassDeclaration
- 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 classClassDeclaration
- Parameters:
indent
- number of spaces leading the lines
-
toString
- Overrides:
toString
in classClassDeclaration
-