6.9.3.8. Calculate goto table

6.9.3.8. Calculate goto table

Start python section to interscript/parsers/lalr1.py[20]
   623: #line 794 "lalr1_parser.ipk"
   624:   def calc_goto_table(self):
   625:       items = self.kernelitems
   626:       res = []
   627:       nonterms = self.nonterms.list()
   628:       for state in items:
   629:         gt = {}
   630:         for nt in nonterms:
   631:           goto = self.goto(state, nt)
   632:           if goto in items: gt[nt] = items.index(goto)
   633:         res.append(gt)
   634:       self.goto_table = res
   635: 
   636: 
End python section to interscript/parsers/lalr1.py[20]