On Tue Aug 05 11:14:16 2008, kjs wrote:
> From PDD19:
> 
> {{DEPRECATION NOTE: PIR will no longer support the old PASM-style syntax
> for registers without dollar signs: C<In>, C<Sn>, C<Nn>, C<Pn>. }}
> 
> 
> kjs

Here's a very simple patch:

Index: imcc.l
=========================================================
==========
--- imcc.l      (revision 32647)
+++ imcc.l      (working copy)
@@ -305,7 +305,12 @@
 
 
 <*>[ISNP]{DIGIT}{DIGIT}? {
-        valp->s = str_dup(yytext);
+        if (valp) (valp)->s = str_dup(yytext);
+
+        if (! IMCC_INFO(interp)->state->pasm_file)
+                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                    "'%s' is only a valid register name in pasm mode", yytext);
+
         return REG;
     }
 

This works in plain PIR, but causes a misparse in a macro: 

error:imcc:'I10' is only a valid register name in pasm mode
        in file 'runtime/parrot/library/Digest/MD5.pir' line 157


Except that the only I10 near that line is $I10.

Thoughts?

-- 
Will "Coke" Coleda
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to