This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add --early-fixup and --late-fixup to bisect.pl, for user-controlled patching.
[perl5.git] / regen / mk_PL_charclass.pl
index 0aac59e..63c06bc 100644 (file)
@@ -23,10 +23,11 @@ require 'regen/regen_lib.pl';
 
 my @properties = qw(
     NONLATIN1_FOLD
-    ALNUMC
+    ALPHANUMERIC
     ALPHA
     ASCII
     BLANK
+    CASED
     CHARNAME_CONT
     CNTRL
     DIGIT
@@ -42,7 +43,9 @@ my @properties = qw(
     UPPER
     WORDCHAR
     XDIGIT
+    VERTSPACE
     IS_IN_SOME_FOLD
+    BACKSLASH_FOO_LBRACE_IS_META
 );
 
 # Read in the case fold mappings.
@@ -170,8 +173,8 @@ for my $ord (0..255) {
         if (! ($name =~ s/_L1$//)) {
 
             # Here, isn't an _L1.  If its _A, it's automatically false for
-            # non-ascii.  The only one current one (besides ASCII) without a
-            # suffix is valid over the whole range.
+            # non-ascii.  The only current ones (besides ASCII) without a
+            # suffix are valid over the whole range.
             next if $name =~ s/_A$// && $ord >= 128;
 
         }
@@ -191,7 +194,7 @@ for my $ord (0..255) {
             $re = qr/[\v\p{Space}]/;
         } elsif ($name eq 'WORDCHAR') {
             $re = qr/\p{XPosixWord}/;
-        } elsif ($name eq 'ALNUMC') {
+        } elsif ($name eq 'ALPHANUMERIC') {
             # Like \w, but no underscore
             $re = qr/\p{Alnum}/;
         } elsif ($name eq 'QUOTEMETA') {
@@ -202,6 +205,13 @@ for my $ord (0..255) {
             $re = qr/\p{Is_Non_Final_Fold}/;
         } elsif ($name eq 'IS_IN_SOME_FOLD') {
             $re = qr/\p{_Perl_Any_Folds}/;
+        } elsif ($name eq 'BACKSLASH_FOO_LBRACE_IS_META') {
+
+            # This is true for FOO where FOO is the varying character in:
+            # \a{, \b{, \c{, ...
+            # and the sequence has non-literal meaning to Perl; so it is true
+            # for 'x' because \x{ is special, but not 'a' because \a{ isn't.
+            $re = qr/[gkNopPx]/;
         } else {    # The remainder have the same name and values as Unicode
             $re = eval "qr/\\p{$name}/";
             use Carp;