Requirements: Integrate a symbol table with the parser generated in Phase 2

 

Tasks/Subtasks:

                  Create symtab.h, symtab.c

o   Hash function

o   Variables to keep track of scope

                  Create symtabMain.c

                  Update Bison file tiny.y

o   Add symbol table creation and semantic checks

o   Semantic errors: multiple declarations, declaration before use rule, last declaration must be main function

                  Symbol table should record: name, type, JVM variable number

                  Generate semantic error message

                  Update parseMain.c to create the symbol table

                  Print contents of symbol table

                  Update Makefile

                  Test program

 

Work Progress:

                  3/15/10 ~ Identified requirements, created plan (30 min)

                  3/23/10 ~ Created symtab.h, symtab.c, wrote hash function, created symbol table struct, tested with symtabMain.c (2 hours)

                  3/30/10 ~ Worked on tiny.y, inserting records to symbol table while parsing, some semantic checks (2 hours)

                  4/6/10 ~ Further work on semantic errors, updated parseMain.c, testing, updated Makefile, submission (2 hours)

 

Estimated Hours of Work for This Phase: 6 hours

 

Actual Hours of Work for This Phase (to date):  6.5 hours