Additional requirements for graduate students
In addition to implementing all of the features of Micro-Pascal as described in class handouts, you will have to implement handling of functions, records, and one-dimensional arrays.
- You must introduce the necessary modifications to the existing Micro-Pascal grammar in order to incorporate definitions of array types as well as declarations of functions and array variables (you will have to recognize new keywords, and a few additional symbols, such as [, and ]). Records may only have fields of integer and real types. Array types may use only integer or real as their base type.
- You will have to introduce changes to the Micro-Pascal grammar dealing with type definitions and expressions to allow function calls and access of array elements.
You may assume that arrays are allowed as variable (reference) parameters only. Note, that Pascal allows only type names (identifiers) in declarations of procedure and function parameters.
Examples of programs with these additional constructs can be found here. |