warn on C<my($foo,$foo)>
[p5sagit/p5-mst-13.2.git] / opcode.pl
index 6a1275d..f9c7503 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -189,7 +189,7 @@ for (@ops) {
     $argsum |= 64 if $flags =~ /d/;            # danger, unknown side effects
     $argsum |= 128 if $flags =~ /u/;           # defaults to $_
 
-    $flags =~ /([^a-zA-Z])/ or die qq[Opcode "$_" has no class indicator];
+    $flags =~ /([\W\d_])/ or die qq[Opcode "$_" has no class indicator];
     $argsum |= $opclass{$1} << 8;
     $mul = 4096;                               # 2 ^ OASHIFT
     for $arg (split(' ',$args{$_})) {
@@ -207,6 +207,17 @@ print <<END;
 #endif
 END
 
+close OC or die "Error closing opcode.h: $!";
+
+unlink "pp_proto.h";
+open PP, '>pp_proto.h' or die "Error creating pp_proto.h: $!";
+for (@ops) {
+    next if /^i_(pre|post)(inc|dec)$/;
+    print PP "PPDEF(pp_$_)\n";
+}
+
+close PP or die "Error closing pp_proto.h: $!";
+
 ###########################################################################
 sub tab {
     local($l, $t) = @_;
@@ -237,7 +248,7 @@ padav               private array           ck_null         d0
 padhv          private hash            ck_null         d0
 padany         private something       ck_null         d0
 
-pushre         push regexp             ck_null         /
+pushre         push regexp             ck_null         d/
 
 # References and stuff.
 
@@ -263,8 +274,10 @@ rcatline   append I/O operator     ck_null         t%
 # Bindable operators.
 
 regcmaybe      regexp comp once        ck_fun          s1      S
+regcreset      regexp reset interpolation flag ck_fun          s1      S
 regcomp                regexp compilation      ck_null         s|      S
 match          pattern match           ck_match        d/
+qr             pattern quote           ck_match        s/
 subst          substitution            ck_null         dis/    S
 substcont      substitution cont       ck_null         dis|    
 trans          character translation   ck_null         is"     S
@@ -419,7 +432,7 @@ anonhash    anonymous hash          ck_fun          ms@     L
 
 splice         splice                  ck_fun          m@      A S? S? L
 push           push                    ck_fun          imst@   A L
-pop            pop                     ck_shift        si%     A
+pop            pop                     ck_shift        s%      A
 shift          shift                   ck_shift        s%      A
 unshift                unshift                 ck_fun          imst@   A L
 sort           sort                    ck_sort         m@      C? L
@@ -496,7 +509,7 @@ sselect             select system call      ck_select       t@      S S S S
 select         select                  ck_select       st@     F?
 
 getc           getc                    ck_eof          st%     F?
-read           read                    ck_sysread      imst@   F R S S?
+read           read                    ck_fun          imst@   F R S S?
 enterwrite     write                   ck_fun          dis%    F?
 leavewrite     write exit              ck_null         1       
 
@@ -505,11 +518,11 @@ print             print                   ck_listiob      ims@    F? L
 
 sysopen                sysopen                 ck_fun          s@      F S S S?
 sysseek                sysseek                 ck_fun          s@      F S S
-sysread                sysread                 ck_sysread      imst@   F R S S?
+sysread                sysread                 ck_fun          imst@   F R S S?
 syswrite       syswrite                ck_fun          imst@   F S S S?
 
 send           send                    ck_fun          imst@   F S S S?
-recv           recv                    ck_sysread      imst@   F R S S
+recv           recv                    ck_fun          imst@   F R S S
 
 eof            eof                     ck_eof          is%     F?
 tell           tell                    ck_fun          st%     F?