Moves the scanner back (or forward) to the specified cursor location.

def restore(self, cursor):
    " Moves the scanner back (or forward) to the specified cursor location. "

    if not isinstance(cursor, Cursor):
      raise TypeError('expected Cursor object', type(cursor))
    self.index, self.lineno, self.colno = cursor