/******************************************************************* This is the symbol table class which maps identifiers to integers. update is used to add new identifiers and their associated values to the table and lookup is used to return the value associated with an identifier *******************************************************************/ class Table { String id; int value; Table tail; Table(String i, int v, Table t) {id=i; value=v; tail=t;} Table update(Table t, String i, int v) {return new Table(i,v,t);} int lookup(Table t, String key){ if ((t.id).equals(key)) return t.value; else return lookup(t.tail, key); } }