All --

The labels autogenerated by the Jako compiler use uppercase characters
and underscores. This patch makes the opcode inference logic in the
assembler happy with that situation. It also prints out the qualified
opcode it inferred when it fails to find a matching opcode.


Regards,

-- Gregor
 _____________________________________________________________________ 
/     perl -e 'srand(-2091643526); print chr rand 90 for (0..4)'      \

   Gregor N. Purdy                          [EMAIL PROTECTED]
   Focus Research, Inc.                http://www.focusresearch.com/
   8080 Beckett Center Drive #203                   513-860-3570 vox
   West Chester, OH 45069                           513-860-3579 fax
\_____________________________________________________________________/
Index: assemble.pl
===================================================================
RCS file: /home/perlcvs/parrot/assemble.pl,v
retrieving revision 1.21
diff -u -r1.21 assemble.pl
--- assemble.pl 2001/09/15 15:45:28     1.21
+++ assemble.pl 2001/09/15 18:37:07
@@ -121,7 +121,7 @@
                    } elsif(m/^((-?\d+)|(0b[01]+)|(0x[0-9a-f]+))$/i) {
                        # integer
                        push @arg_t,'ic';
-                   } elsif(m/^[a-z][\w]*$/i) {
+                   } elsif(m/^[A-Za-z_][\w]*$/i) {
                        # label
                        push @arg_t,'ic';
                    } else {
@@ -146,7 +146,7 @@
                    last;
                }
            }
-            error("No opcode $opcode in <$_>") if(!$found_op);
+            error("No opcode $opcode (tried $test) in <$_>") if(!$found_op);
         }
         if (@args != $opcodes{$opcode}{ARGS}) {
             error("Wrong arg count--got ".scalar(@args)." needed 
".$opcodes{$opcode}{ARGS});

Reply via email to