This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Define PatWS for Unicode versions missing it
authorKarl Williamson <khw@cpan.org>
Fri, 26 Jun 2015 03:56:17 +0000 (21:56 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 29 Jul 2015 04:15:54 +0000 (22:15 -0600)
This property is used by Perl in all Unicode releases, so needs to be
present in all releases, but Unicode did not define it in early
releases, though it should have the same short definition in all of
them.  If there is no Unicode data defining it, hard-code the definition
into mktables.

charclass_invlists.h
lib/unicore/mktables
regcharclass.h

index 72baf11..40db2ba 100644 (file)
@@ -99521,7 +99521,7 @@ static const UV XPosixXDigit_invlist[] = { /* for EBCDIC POSIX-BC */
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * b903e494ecf23eb66110195a4da0b3d37b81b7bfb4935e0de184592577349180 lib/unicore/mktables
+ * 1fa9cf6726075efd2a5c3e13acf51aaa45e3c63195e5c19f90c9deb3ffbf8d77 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * f199f92c0b5f87882b0198936ea8ef3dc43627b57a77ac3eb9250bd2664bbd88 regen/mk_invlists.pl
index ffc2f53..be7413a 100644 (file)
@@ -14426,6 +14426,25 @@ END
         $unassigned->set_equivalent_to($age_default, Related => 1);
     }
 
+    my $patws = $perl->add_match_table('_Perl_PatWS',
+                                       Perl_Extension => 1,
+                                       Fate => $INTERNAL_ONLY);
+    if (defined (my $off_patws = property_ref('Pattern_White_Space'))) {
+        $patws->initialize($off_patws->table('Y'));
+    }
+    else {
+        $patws->initialize([ ord("\t"),
+                             ord("\n"),
+                             utf8::unicode_to_native(0x0B), # VT
+                             ord("\f"),
+                             ord("\r"),
+                             ord(" "),
+                             utf8::unicode_to_native(0x85), # NEL
+                             0x200E..0x200F,             # Left, Right marks
+                             0x2028..0x2029              # Line, Paragraph seps
+                           ] );
+    }
+
     # See L<perlfunc/quotemeta>
     my $quotemeta = $perl->add_match_table('_Perl_Quotemeta',
                                            Perl_Extension => 1,
index 5cc1988..81c0015 100644 (file)
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * b903e494ecf23eb66110195a4da0b3d37b81b7bfb4935e0de184592577349180 lib/unicore/mktables
+ * 1fa9cf6726075efd2a5c3e13acf51aaa45e3c63195e5c19f90c9deb3ffbf8d77 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * 8b29da548b7ad90659de234b5061a8c9fb0f40322a256d60fc5e9385ae4ece0e regen/regcharclass.pl