Updated code for generating symbol table