def __accept__(self,stype):
        """Accept the next symbol if type stype."""
        if self.sym['type'] == stype:
            self.__next__()
        else:
            self.parseerror('Expected {} but saw {}/{}'.format(
                             stype, self.sym['type'], repr(self.sym['txt'])))
def __accept__ ( self , stype ) : if self . sym [ 'type' ] == stype : self . __next__ ( ) else : self . parseerror ( 'Expected {} but saw {}/{}' . format ( stype , self . sym [ 'type' ] , repr ( self . sym [ 'txt' ] ) ) )
Accept the next symbol if type stype.