code: def errorstack(self, tokens, i, full=False):
          
          print("\n-- Stacks of completed symbols:")
          states = [s for s in self.edges.values() if s]
          # States now has the set of states we are in
          state_stack = set()
          for state in states:
              # Find rules which can follow, but keep only
              # the part before the dot
              for rule, dot in self.states[state].items:
                  lhs, rhs = rule
                  if dot > 0:
                      if full:
                          state_stack.add(
                              "%s ::= %s . %s" %
                              (lhs,
                              ' '.join(rhs[:dot]),
                              ' '.join(rhs[dot:])))
                      else:
                          state_stack.add(
                              "%s ::= %s" %
                              (lhs,
                              ' '.join(rhs[:dot])))
                      pass
                  pass
              pass
          for stack in sorted(state_stack):
              print(stack)
docs: Show the stacks of completed symbols.
          We get this by inspecting the current transitions
          possible and from that extracting the set of states
          we are in, and from there we look at the set of
          symbols before the "dot". If full is True, we
          show the entire rule with the dot placement.
          Otherwise just the rule up to the dot.