This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
unicode_constants.pl: Prepare for examining Symbols
authorKarl Williamson <khw@cpan.org>
Thu, 17 Mar 2022 16:35:00 +0000 (10:35 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 20 Mar 2022 05:17:51 +0000 (23:17 -0600)
commit50b179151ab7c50465ad9dcd16636805978a0ada
tree20b4c0ed9082d847b6210be1a81972958aeee20f
parentc1b67e77ce8e2d80062d1f23dfe4c8e0cdbfd590
unicode_constants.pl: Prepare for examining Symbols

Heretofore, the code looking for paired string delimiters has looked at
punctuation, and a few symbols that Unicode gives a mirror for.  But
there are many more suitable-for-pairing characters in Unicode.

This commit generalizes things so as to handle the extra complexities of
the way symbols are named beyond the punctuation names.   For example,
RIGHTWARDS is sometimes used; it turns out that it also is used in one
punctuation character, which was previously overlooked by this script.

The generalization introduced by this commit handles almost all current
Unicode symbols properly.

But some symbols are barely distinguishable from their mirrors, such as
a tilde and a reversed tilde.  The scheme adopted here, then, makes the
default for a symbol pair to not be marked as paired delimiters.  The
code explicitly has to specify that a given pair is to be included.

The next few commits are mostly for adding ones that I thought were
good.
lib/feature.pm
regen/feature.pl
regen/unicode_constants.pl
unicode_constants.h