From 4486762a8519783aaec7ebe6a391355cd30792e0 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 19 Jun 2007 17:53:10 +0000 Subject: Make an error message a little more descriptive. --HG-- extra : convert_revision : dbde025b1dcec0083e7276a9938bd21e7ab2887f --- src/arch/micro_asm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/arch/micro_asm.py') diff --git a/src/arch/micro_asm.py b/src/arch/micro_asm.py index a8a63e1f8..145029477 100644 --- a/src/arch/micro_asm.py +++ b/src/arch/micro_asm.py @@ -131,7 +131,8 @@ def handle_statement(parser, container, statement): microop = eval('parser.microops[statement.mnemonic](%s)' % statement.params) except: - print_error("Error creating microop object.") + print_error("Error creating microop object with mnemonic %s." % \ + statement.mnemonic) raise try: for label in statement.labels: -- cgit v1.2.3 From 27da9f99b1a294411629e89ab1abf04f91c3fd64 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 20 Jun 2007 19:04:38 +0000 Subject: Comment out some unnecessary debug statements. --HG-- extra : convert_revision : aabaaf099f070832bf42cedf2472170e0738ee1c --- src/arch/micro_asm.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/arch/micro_asm.py') diff --git a/src/arch/micro_asm.py b/src/arch/micro_asm.py index 145029477..5aa910cc3 100644 --- a/src/arch/micro_asm.py +++ b/src/arch/micro_asm.py @@ -238,9 +238,7 @@ def t_params_PARAMS(t): unescapeParamsRE = re.compile(r'(\\[\n;\\])') def unescapeParams(mo): val = mo.group(0) - print "About to sub %s for %s" % (val[1], val) return val[1] - print "Looking for matches in %s" % t.value t.value = unescapeParamsRE.sub(unescapeParams, t.value) t.lexer.begin('asm') return t @@ -483,9 +481,9 @@ class MicroAssembler(object): def assemble(self, asm): self.parser.parse(asm, lexer=self.lexer) # Begin debug printing - for macroop in self.parser.macroops.values(): - print macroop - print self.parser.rom + #for macroop in self.parser.macroops.values(): + # print macroop + #print self.parser.rom # End debug printing macroops = self.parser.macroops self.parser.macroops = {} -- cgit v1.2.3