Create a "SemanticAnalysisVisitor" class that makes one more pass over the AST to detect a larger set of semantic errors.
Detect and report the following errors, including location information.
Submit a Makefile and all files needed to build your compiler. Also include a text file (".txt" extension) listing your team members, their contributions, what functionality works, what doesn't, and the areas with which you struggled.
Take the name of a C- program as a command-line argument. If no argument is specified read from standard input. Use ".cm" as the extension for C- source files.
Output errors as in the previous assignment. If a program is syntactically valid, create a symbol table visitor to pair use nodes with declaration nodes. Report any undeclared or multiply-declared variables, along with location information.
If no errors have been detected, perform a semantic analysis pass with your "SemanticAnalysisVisitor". If there are no errors, print the AST as before, but now annotated with type information.
Submit a Makefile and all files needed to build your compiler ("CMinus"). Also include a text file "Team.txt" listing your team members, their contributions, what functionality works, what doesn't, and the areas with which you struggled.
You may want to add a dataType field to certain nodes in your AST. You may also want to add enumerators to enum ValueType such as INT_FUNCTION and VOID_FUNCTION.