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.ProcedureDeclaration
simula.compiler.syntaxClass.declaration.SwitchDeclaration
- All Implemented Interfaces:
Externalizable
,Serializable
Switch Declaration.
Simula Standard: 5.3 Switch declaration switch-declaration = SWITCH switch-identifier := switch-list switch-list = designational-expression { , designational-expression }Link 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.Declaration
Declaration.Kind
-
Field Summary
Modifier and TypeFieldDescription(package private) Vector
<Expression> The switch list of label expressions.Fields inherited from class simula.compiler.syntaxClass.declaration.ProcedureDeclaration
myVirtual, parameterList
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
ConstructorDescriptionDefault constructor used by Externalization.SwitchDeclaration
(String ident) Create a new SwitchDeclaration. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Coding Utility: codeProcedureBody.void
Perform semantic checking.toString()
Methods inherited from class simula.compiler.syntaxClass.declaration.ProcedureDeclaration
doJavaCoding, expectProcedureDeclaration, findVisibleAttributeMeaning, print, printTree, readExternal, writeExternal
Methods inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
addLeadingLabel, codeStatements, codeSTMBody, doCheckLabelList, expectFormalParameterPart, hasLabel, 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
-
switchList
Vector<Expression> switchListThe switch list of label expressions.
-
-
Constructor Details
-
SwitchDeclaration
Create a new SwitchDeclaration.- Parameters:
ident
- switch identifier
-
SwitchDeclaration
public SwitchDeclaration()Default constructor used by Externalization.
-
-
Method Details
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.This must be redefined in every subclass.
- Overrides:
doChecking
in classProcedureDeclaration
-
codeProcedureBody
protected void codeProcedureBody()Description copied from class:ProcedureDeclaration
Coding Utility: codeProcedureBody. Redefined in SwitchDeclaration.- Overrides:
codeProcedureBody
in classProcedureDeclaration
-
toString
- Overrides:
toString
in classProcedureDeclaration
-