Next: Name analysis of qualified
Up: Type Analysis
Previous: Operator.d
Statements
ATTR FuncName: DefTableKey;
RULE: statement ::= variable ':=' expression COMPUTE
RootContext(
IF(NE(variable.FuncName,NoKey),
FinalType(GetResultType(variable.FuncName,NoKey)),
variable.Type),
,
expression);
Indication(assignCvt);
END;
RULE: Decl ::= 'function' FncIdDef FuncBody COMPUTE
FuncBody.FuncName=FncIdDef.Key;
END;
RULE: Decl ::= 'function' FncIdUse ';' Body COMPUTE
Body.FuncName=FncIdUse.Key;
END;
RULE: FuncBody ::= Formals ':' TypIdUse ';' block COMPUTE
FuncBody.GotResultType=ResetResultType(FuncBody.FuncName,TypIdUse.Type);
END;
RULE: FuncBody ::= ':' TypIdUse ';' block COMPUTE
FuncBody.GotResultType=ResetResultType(FuncBody.FuncName,TypIdUse.Type);
END;
SYMBOL program COMPUTE
SYNT.GotResultTypes=CONSTITUENTS FuncBody.GotResultType;
END;
SYMBOL variable COMPUTE
SYNT.FuncName=NoKey <- INCLUDING RootType.GotAllTypes;
END;
SYMBOL program COMPUTE
SYNT.FuncName=NoKey <- INCLUDING RootType.GotAllTypes;
END;
RULE: variable ::= ExpIdUse COMPUTE
variable.FuncName=
IF(EQ(
ExpIdUse.Key,
INCLUDING (FuncBody.FuncName,Body.FuncName,program.FuncName)),
ExpIdUse.Key,
NoKey);
END;
This macro is defined in definitions 37 and 39.
This macro is invoked in definition 1.
Property definitions[38]
:
ResultType: DefTableKey;
This macro is defined in definitions 11, 19, 24, 30, 34, and 38.
This macro is invoked in definition 7.
RULE: statement ::= 'if' expression 'then' statement COMPUTE
expression.Required=boolType;
END;
RULE: statement ::= 'if' expression 'then' statement 'else' statement COMPUTE
expression.Required=boolType;
END;
RULE: statement ::= 'case' expression 'of' cases 'end' COMPUTE
END;
RULE: statement ::= 'repeat' StmtList 'until' expression COMPUTE
expression.Required=boolType;
END;
RULE: statement ::= 'while' expression 'do' statement COMPUTE
END;
RULE: statement ::= 'for' ExpIdUse ':=' expression 'to' expression
'do' statement COMPUTE
END;
RULE: statement ::= 'for' ExpIdUse ':=' expression 'downto' expression
'do' statement COMPUTE
END;
This macro is defined in definitions 37 and 39.
This macro is invoked in definition 1.
Next: Name analysis of qualified
Up: Type Analysis
Previous: Operator.d
2008-08-29