| Lab | Assigned | Lab Due (Start of class) |
||
|---|---|---|---|---|
| 19 | Mar | 2 | Apr | |
The essential task performed here is to associate the declaration of a name to the relevant uses of that declared name.
There are two ways for you to do this, and either way is acceptable:
package parser;so that the generated parser is in the right package.
| SymtabVisitor.java | This is the only file you will submit. It contains the visitor as a public class and an implementation of a symbol table as a non-public class. Instructions on its use are found in the code and its documentation. |
| ClassSymtabVisitor.class | This is my implementation of the visitor, found in
classsolutions.jar. Your installed code will use it until
you make the appropriate change in SymtabVisitor.
You'll have to change over to your implementation because that's what you're turning in for ths lab. |
| ClassBuildSymtab.class | This is my implementation of the symbol table itself, found in classsolutions.jar For this lab, you can continue using mine unless you want to use your own, or the one you developed in Studio, in which case you should make the appropriate change in SymtabVisitor. |
setSymInfo method to set the symbol information
for this declaration in the AST (so it looks nice when it prints).
Don't worry aobut the getRegister/setRegister methods -- they are used later.
Error: Undefined Referenceand indicate the offending node. The easiest way to do this is to use the out method: see the documentation
Error: Duplicate declaration