This assignment makes use of the files contained in this zip file. This assignment is due Thursday, April 4. This assignment is based on the languages cs50200-language-hw4 and cs50200-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 the halting of the interpreter, will find the undeclared variable, 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 Thursday, April 4. |