This is an old revision of the document!

CMPU-331 Compilers (Spring 2018)


  1. You must implement eighteen semantic actions. These actions are responsible for all remaining operatins, including procedure/function declarations, result variables, and allocation and deallocation of local storage.
    (Actions 5, 11, 15, 16, 17, 19, 20, 21, 35, 51, 54, 36, 37, 49, 50, 51, 51WRITE and 51READ.)


Augmented Grammar

Semantic Actions Phase IV

Sample Code

Sample .VAS files are available for you to test your code on, together with .TVI files for you to compare against.

Sample code for Phase IV.


The address numbers in your code may differ from the ones in this sample code. This depends on the precise order in which they are generated. Of primary importance are the numbers for the alloc command, and that the address numbers refer to the correct symbols.