java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.expression.Expression
simula.compiler.syntaxClass.expression.ObjectGenerator
ObjectGenerator i.e. new Object expression.
Simula Standard: 3.8 Object expressions object-generator = NEW class-identifier [ ( actual-parameter-part ) ] actual-parameter-part = "(" actual-parameter { , actual-parameter } ")" actual-parameter = expression | array-identifier-1 | switch-identifier | procedure-identifier-1Link to GitHub: Source File.
- Author:
- SIMULA Standards Group, Øystein Myhre Andersen
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Vector
<Expression> The actual parameters after checkingprivate final String
The class-identifierprivate Meaning
The semantic meaningprivate final Vector
<Expression> The actual parameters before checkingFields inherited from class simula.compiler.syntaxClass.expression.Expression
backLink, type
Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
lineNumber
-
Constructor Summary
ModifierConstructorDescriptionprivate
ObjectGenerator
(String ident, Vector<Expression> params) Create a new ObjectGenerator -
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform semantic checking.(package private) static Expression
Parse an object generatorboolean
Returns true if this expression may be used as a statement.Generate Java code for this Syntax Class.toString()
Methods inherited from class simula.compiler.syntaxClass.expression.Expression
acceptExpression, checkCompatibility, evaluate, expectExpression, get, getInt, getNumber, getQualification, getWriteableVariable, printTree, put
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED
-
Field Details
-
classIdentifier
The class-identifier -
meaning
The semantic meaning -
params
The actual parameters before checking -
checkedParams
The actual parameters after checking
-
-
Constructor Details
-
ObjectGenerator
Create a new ObjectGenerator- Parameters:
ident
- class-identifierparams
- the actual parameters
-
-
Method Details
-
expectNew
Parse an object generatorobject-generator = NEW class-identifier [ ( actual-parameter-part ) ] actual-parameter-part = "(" actual-parameter { , actual-parameter } ")"
- Returns:
- the newly created ObjectGenerator.
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.This must be redefined in every subclass.
- Overrides:
doChecking
in classSyntaxClass
-
maybeStatement
public boolean maybeStatement()Description copied from class:Expression
Returns true if this expression may be used as a statement.- Specified by:
maybeStatement
in classExpression
- Returns:
- true if this expression may be used as a statement
-
toJavaCode
Description copied from class:SyntaxClass
Generate Java code for this Syntax Class.- Overrides:
toJavaCode
in classSyntaxClass
- Returns:
- Java code
-
toString
- Overrides:
toString
in classExpression
-