Class UndefinedDeclaration
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.declaration.Declaration
simula.compiler.syntaxClass.declaration.UndefinedDeclaration
Undefined Declaration.
Link to GitHub: Source File.
- Author:
- SIMULA Standards Group, Øystein Myhre Andersen
-
Field Summary
Fields inherited from class Declaration
declarationKind, declaredIn, externalIdent, identifier, isProtected, type
Fields inherited from class SyntaxClass
CHECKED, lineNumber, OBJECT_SEQU
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor used by Attribute File I/OUndefinedDeclaration
(String identifier) Create a new UndefinedDeclaration. -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildDeclaration
(ClassBuilder classBuilder, BlockDeclaration encloser) Output Java ByteCode.void
buildInitAttribute
(CodeBuilder codeBuilder) Output Java ByteCode.void
Perform semantic checking.void
Output possible declaration Java code.ClassFile coding utility: get getFieldIdentifier.ClassFile coding utility: get FieldRefEntry of this SimpleVariable.void
Utility print syntax tree method.static UndefinedDeclaration
Read and return an object.Generate Java code for this Syntax Class.toString()
void
Write a SyntaxClass object to a AttributeOutputStream.Methods inherited from class Declaration
acceptDeclaration, buildDeclarationCode, checkAlreadyDefined, getJavaIdentifier, isCompatibleClasses, verifyTree
Methods inherited from class SyntaxClass
ASSERT_SEMANTICS_CHECKED, buildByteCode, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED, setLineNumber
-
Constructor Details
-
UndefinedDeclaration
Create a new UndefinedDeclaration.- Parameters:
identifier
- the variable identifier
-
UndefinedDeclaration
public UndefinedDeclaration()Default constructor used by Attribute File I/O
-
-
Method Details
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.
This must be redefined in every subclass.
- Overrides:
doChecking
in classSyntaxClass
-
doDeclarationCoding
public void doDeclarationCoding()Description copied from class:SyntaxClass
Output possible declaration Java code.- Overrides:
doDeclarationCoding
in classSyntaxClass
-
toJavaCode
Description copied from class:SyntaxClass
Generate Java code for this Syntax Class.- Overrides:
toJavaCode
in classSyntaxClass
- Returns:
- Java code
-
getFieldRefEntry
ClassFile coding utility: get FieldRefEntry of this SimpleVariable.- Parameters:
pool
- the ConstantPoolBuilder to use.- Returns:
- the FieldRefEntry of this SimpleVariable.
-
getFieldIdentifier
Description copied from class:Declaration
ClassFile coding utility: get getFieldIdentifier.- Overrides:
getFieldIdentifier
in classDeclaration
- Returns:
- the resulting String.
-
buildDeclaration
Description copied from class:Declaration
Output Java ByteCode. Treat Declaration.- Overrides:
buildDeclaration
in classDeclaration
- Parameters:
classBuilder
- the classBuilder to use.encloser
- the owning block.
-
buildInitAttribute
Description copied from class:Declaration
Output Java ByteCode. Build init code for an Attribute.- Overrides:
buildInitAttribute
in classDeclaration
- Parameters:
codeBuilder
- the codeBuilder to use.
-
printTree
Description copied from class:SyntaxClass
Utility print syntax tree method.- Overrides:
printTree
in classSyntaxClass
- Parameters:
indent
- number of spaces leading the lineshead
- the head of the tree.
-
toString
-
writeObject
Description copied from class:SyntaxClass
Write a SyntaxClass object to a AttributeOutputStream.- Overrides:
writeObject
in classSyntaxClass
- Parameters:
oupt
- the AttributeOutputStream to write to.- Throws:
IOException
- if something went wrong.
-
readObject
Read and return an object.- Parameters:
inpt
- the AttributeInputStream to read from- Returns:
- the object read from the stream.
- Throws:
IOException
- if something went wrong.
-