next up previous
Next: Required simple types Up: Type Analysis Previous: Type Analysis


The Pascal type model

A type model consists of a number of language-defined types and operators, plus facilities for constructing user-defined types. The model is defined primarily with OIL, but this section also contains some LIDO computations.

Type.oil[3]:
Required simple types[6]
Enumerated types[9]
Subrange types[12]
Array types[14]
Set types[17]
File types[20]
Pointer types[22]
This macro is attached to a product file.

Since all of the user-defined types create operators, it's useful to bundle the type denotation and operator definition roles into a single role:

Establish a user-defined type[4]:
SYMBOL TypeDenoter INHERITS TypeDenotation, OperatorDefs END;
This macro is defined in definitions 4, 10, 13, 15, 16, 18, 21, and 23.
This macro is invoked in definition 1.

FIXME: This implementation makes no distinction between packed and unpacked types.

Packing[5]:
RULE: type ::= 'packed' type COMPUTE
  type[1].Type=type[2].Type;
END;
This macro is invoked in definition 1.



Subsections
next up previous
Next: Required simple types Up: Type Analysis Previous: Type Analysis
2008-08-29