X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/699ffc5e6f6d1426d23e60b98f7935ec76291935..df14fc1356c4b115f6728bf48e976bd98e8c29b0:/regen/mk_PL_charclass.pl diff --git a/regen/mk_PL_charclass.pl b/regen/mk_PL_charclass.pl index 0aac59e..63c06bc 100644 --- a/regen/mk_PL_charclass.pl +++ b/regen/mk_PL_charclass.pl @@ -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;