This assignment makes use of the files contained in this zip file. This assignment is due Wednesday, October 13. This assignment is based on the languages cs502-language-hw4 and Language-10. A common kind of programming error is to reference a variable that has not been declared previously in your program (for example, you might misspell a variable name when you are trying to reference it). An interpreter is not a very good tool for finding these kinds of errors. First of all, there are parts of the program text that the interpreter might never see. For example, the interpreter may not traverse the else-clause of an if-expression because the else-clause is meant to handle a rarely occurring error condition. A second reason an interpreter is bad for finding undeclared variables is that the interpreter may not find one until after the program has been running for a long time. The resulting error, and halting of the interpreter, will have found the error, but at the cost of much wasted time. In a statically scoped language, it is possible to find all undeclared variables in a program without having to run the program (this is not true for dynamically scoped languages; for those languages, you must execute the program to find undeclared variables). In this assignment you will write a "static analysis" program that finds all undeclared variable references in a program.
In the zip file there is a text file
Also in the zip file there is a file
The files
When you have finished implementing
Notice how the error messages in
Turn in a zip file containing your versions of This assignment is due Wednesday, October 13. |