def parseerror(self, msg, line=None):
        """Emit parse error and abort assembly."""
        if line is None:
            line = self.sline
        error('parse error: ' + msg + ' on line {}'.format(line))
        sys.exit(-2)