CPSC 411 Compiler construction I
Author: Robin Cockett
Date: 14th Feb. 2018
Assignment #4: Semantic checking for M+
Due date: 4rd April 2018
Using the syntax tree, generated by assignment #3, generate an
intermediate representation tree (following the form described in
/home/411/M+). This assignment involve programming a symbol
table and correctly implementing the attribute system required to
type check and produce the intermediate representation for M+.
You are expected to draw "plumbing diagrams" alongside the major
steps of your code as part of your documentation. Furthermore,
you are expected to pretty print the intermediate representation
(use, for example, the test programs in the /home/411). You
are expected to produce at least five of your own test M programs.
For this series of assignments you must look at the stack
based assembly language AM (see /home/411/AM) and also
at the language description of M+ (see /home/411/M+).
- The M+- language specification is here
- The M++ language specification is here
- The specification of the data types for M+- is here
- The specification of the symbol table is here
- The specification of the AM machine is here