Class ProcedureSpecification
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.ProcedureSpecification
Procedure Specification.
Simula Standard: 5.5.3 Virtual quantities Simula Standard: 6.3 External procedure declaration procedure-specification = [ type ] PROCEDURE procedure-identifier procedure-head empty-body procedure-head = [ formal-parameter-part ; [ mode-part ] specification-part ] ; empty-body = dummy-statement procedure-identifier = identifier formal-parameter-part = "(" formal-parameter { , formal-parameter } ")" formal-parameter = identifier specification-part = specifier identifier-list ; { specifier identifier-list ; } specifier = type [ array | procedure ] | label | switch mode-part = name-part [ value-part ] | value-part [ name-part ] name-part = name identifier-list ; value-part = value identifier-list ; identifier-list = identifier { , identifier }
Link to GitHub: Source File.
- Author:
- SIMULA Standards Group, Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The procedure identifier.The parameter list.The procedure's type.Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
CHECKED, lineNumber, OBJECT_SEQU
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor used by Attribute File I/OProcedureSpecification
(String identifier, Type type, ObjectList<Parameter> pList) Create a new ProcedureSpecification -
Method Summary
Modifier and TypeMethodDescriptionvoid
doChecking
(DeclarationScope scope) Perform semantic checking.static ProcedureSpecification
Procedure Specification.static ProcedureSpecification
Read and return a ProcedureSpecification.toString()
static void
Write a ProcedureSpecification.Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, buildByteCode, doChecking, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, printTree, readObject, SET_SEMANTICS_CHECKED, setLineNumber, toJavaCode, writeObject
-
Field Details
-
identifier
The procedure identifier. -
type
The procedure's type. -
parameterList
The parameter list.
-
-
Constructor Details
-
ProcedureSpecification
Create a new ProcedureSpecification- Parameters:
identifier
- procedure-identifiertype
- procedure's type or nullpList
- the parameter lList
-
ProcedureSpecification
public ProcedureSpecification()Default constructor used by Attribute File I/O
-
-
Method Details
-
expectProcedureSpecification
Procedure Specification.
Syntax: procedure-specification = [ type ] PROCEDURE procedure-identifier procedure-head empty-body procedure-head = [ formal-parameter-part ; [ mode-part ] procedure-specification-part ] ; empty-body = dummy-statement procedure-identifier = identifier
Precondition:
type
PROCEDURE is already read.- Parameters:
type
- procedure's type- Returns:
- a newly created ProcedureSpecification
-
doChecking
Perform semantic checking.- Parameters:
scope
- the DeclarationScope
-
toString
-
writeProcedureSpec
public static void writeProcedureSpec(ProcedureSpecification spec, AttributeOutputStream oupt) throws IOException Write a ProcedureSpecification.- Parameters:
spec
- the ProcedureSpecification.oupt
- the AttributeOutputStream.- Throws:
IOException
- if something went wrong.
-
readProcedureSpec
public static ProcedureSpecification readProcedureSpec(AttributeInputStream inpt) throws IOException Read and return a ProcedureSpecification.- Parameters:
inpt
- the AttributeInputStream to read from- Returns:
- the ProcedureSpecification read from the stream.
- Throws:
IOException
- if something went wrong.
-