<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scanerror(self, msg):
 """Emit scan error and abort assembly."""

        error('scan error: ' + msg + ' on line {}'.format(self.sline))
        sys.exit(-1)