Question: function: function _ header { variable } body function _ header: FUNCTION IDENTIFIER [ parameters ] RETURNS type ; variable: IDENTIFIER : type IS statement
function:
functionheader variable body
functionheader:
FUNCTION IDENTIFIER parameters RETURNS type ;
variable:
IDENTIFIER : type IS statement ;
IDENTIFIER : LIST OF type IS list ;
list:
expression expression
parameters:
parameter parameter
parameter:
IDENTIFIER : type
type:
INTEGER REAL CHARACTER
body:
BEGIN statement END ;
statement:
expression ;
WHEN condition expression : expression ;
SWITCH expression IS case OTHERS ARROW statement ENDSWITCH ;
IF condition THEN statement ELSIF condition THEN statement
ELSE statement ENDIF ;
FOLD direction operator listchoice ENDFOLD ;
case:
CASE INTLITERAL ARROW statement
direction:
LEFT RIGHT
operator:
ADDOP MULOP
listchoice:
list
IDENTIFIER
condition:
expression RELOP expression
condition logicaloperator condition
condition
NOTOP condition
logicaloperator:
ANDOP OROP
expression:
expression
expression arithmeticoperator expression
NEGOP expression
INTLITERAL REALLITERAL CHARLITERAL
IDENTIFIER expression
IDENTIFIER
arithmeticoperator: ADDOP MULOP MODOP EXPOP
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
