Assignment 2

In this assignment, you will add support for labels to the intermediate language, write some assembly language programs that use labels, and add support for comments and nested blocks to the intermediate language.

In Transformations.scala, complete the implementation of eliminateLabels.

In A2.scala, complete the implementation of:

  1. maximum
  2. maximumUnsigned

Back in Transformations.scala, complete the implementation of:

  1. eliminateComments
  2. eliminateBlocks
  3. transformCodeTotal

Note: transformCodeTotal will not be tested as part of Assignment 2, but will be used in Assignment 3 and later assignments.