The Symbol Table

Create a table whose keys are strings and whose values are trees. Keep it simple. You should be able to

  1. ask whether a particular string is a key in the table,
  2. insert a particular string, with a corresponding tree, into the table,
  3. look up a string and get the corresponding tree.

You will use this table for identifiers that are defined in a def definition. For example, at definition

  def main = A end
you store key "main", tree A into the table.

When you have the symbol table working, submit it using the following command.

  ~abrahamsonk/5220/bin/submit symboltable symboltable.c symboltable.h ast.h ast.c allocate.h stringtable.h stringtable.c

Include any other files that are needed to test the symbol table.