code: def p_toc(self, toc):
          '''toc : HEADERSEC opttexts TOC opttexts'''
          toc[0] = TableOfContent(toc[1], toc[2], [])
          self.toc = toc[0f p_toc(self, toc):
          '''toc : HEADERSEC opttexts TOC opttexts'''
          toc[0] = TableOfContent(toc[1], toc[2], [])
          self.toc = toc[0]
docs: toc : HEADERSEC opttexts TOC opttexts