code: def symbol(self, index):
          
          #if index is actually a string, just return it
          if isinstance(index, str):
              return index
          elif (index < 0) or (index >= self.symtab.table_len):
              self.error("symbol table index out of range")
          sym = self.symtab.table[index]
          #local variables are located at negative offset from frame pointer register
          if sym.kind == SharedData.KINDS.LOCAL_VAR:
              return "-{0}(1:%14)".format(sym.attribute * 4 + 4)
          #parameters are located at positive offset from frame pointer register
          elif sym.kind == SharedData.KINDS.PARAMETER:
              return "{0}(1:%14)".format(8 + sym.attribute * 4)
          elif sym.kind == SharedData.KINDS.CONSTANT:
              return "${0}".format(sym.name)
          else:
              return "{0}".format(sym.name)
docs: Generates symbol name from index