國立清華大學資訊工程學系
CS 3404 --- 編譯器設計
Assignment #4
Due: 5:00 p.m., June 28, 1999
(大四和研二同學可以不必交)
In this assignment, you will build a symbol table for
programs written in Macro.
You are only required to implement a symbol table and check that variables
are declared before they are used.
Report any variables that are not declared or are not declared properly.
We will not test the following Macro constructs:
- private
- procedure and function, their parameter lists, and their calls and returns
- record
- exit
- if-then-else
- loop-end loop
You only have to handle programs that consist of only a
single package, so only one scope will be used.
You only need to consider one dimensional arrays with fixed bounds.
Our test programs will not be more complex than
this.
Acknowledgement
This assignment is from CS 4410/6415 (Introduction to Compiler
Design) of Georgia Institute of Technology, offered by Dr. Richard
LeBlanc in Fall, 1998.