Description
For this assignment you will write a name analyzer for Wumbo programs represented as abstract-syntax trees. Your main task will be to write name analysis methods for the nodes of the AST. In addition you will need to:
-
Modify the Sym class (by including some new fields and methods and/or by defining some subclasses).
-
Modify the IdNode class in ast.java (by including a new Sym field and by modifying its unparse method).
-
Modify P4.java (an extension of P3.java).
-
Modify the ErrMsg class.
-
Write two test inputs: nameErrors.wumbo and test.wumbo to test your new code.
Specifications
Getting Started
Name Analysis
struct Handling Issues
Error Reporting
Other Tasks
Extending the Sym Class
Modifying the IdNode Class
P4.java
Modifying the ErrMsg Class
Writing Test Inputs
Some Advice
Getting Started
The files are:
Here is p4.zip file. It is recommended to start your project with it.
Name Analysis
The name analyzer will perform the following tasks:
CS536 Programming Assignment 4
CS536 Programming Assignment 4
CS536 Programming Assignment 4
CS536 Programming Assignment 4
CS536 Programming Assignment 4
CS536 Programming Assignment 4
http://pages.cs.wisc.edu/~loris/cs536/asn/p4/p4.html Page 7 of 7
