Upgrade to CPAN-1.88_53.
[p5sagit/p5-mst-13.2.git] / regcomp.pl
index bfea6e2..2e84604 100644 (file)
@@ -82,16 +82,20 @@ printf OUT <<EOP,
    Any changes made here will be lost!
 */
 
+/* Regops and State definitions */
+
 #define %*s\t%d
 #define %*s\t%d
 
 EOP
--$width,REGNODE_MAX=>$lastregop-1,-$width,REGMATCH_STATE_MAX=>$tot-1;
+    -$width, REGNODE_MAX        => $lastregop - 1,
+    -$width, REGMATCH_STATE_MAX => $tot - 1
+;
 
 $ind = 0;
 while (++$ind <= $tot) {
   my $oind = $ind - 1;
-  printf OUT "#define\t%*s\t%d\t/*%#04x %s*/\n",
+  printf OUT "#define\t%*s\t%d\t/* %#04x %s */\n",
     -$width, $name[$ind], $ind-1, $ind-1, $rest[$ind];
   print OUT "\n\t/* ------------ States ------------- */\n\n"
     if $ind == $lastregop and $lastregop != $tot;
@@ -99,6 +103,7 @@ while (++$ind <= $tot) {
 
 print OUT <<EOP;
 
+/* PL_regkind[] What type of regop or state is this. */
 
 #ifndef DOINIT
 EXTCONST U8 PL_regkind[];
@@ -118,6 +123,7 @@ print OUT <<EOP;
 };
 #endif
 
+/* regarglen[] - How large is the argument part of the node (in regnodes) */
 
 #ifdef REG_COMP_C
 static const U8 regarglen[] = {
@@ -135,6 +141,8 @@ while (++$ind <= $lastregop) {
 print OUT <<EOP;
 };
 
+/* reg_off_by_arg[] - Which argument holds the offset to the next node */
+
 static const char reg_off_by_arg[] = {
 EOP
 
@@ -149,8 +157,10 @@ while (++$ind <= $lastregop) {
 print OUT <<EOP;
 };
 
+/* reg_name[] - Opcode/state names in string form, for debugging */
+
 #ifdef DEBUGGING
-extern const char * const reg_name[] = {
+const char * reg_name[] = {
 EOP
 
 $ind = 0;
@@ -168,7 +178,7 @@ print OUT <<EOP;
 #endif /* DEBUGGING */
 #else
 #ifdef DEBUGGING
-extern const char * const reg_name[];
+extern const char * reg_name[];
 #endif
 #endif /* REG_COMP_C */