diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-01-19 08:43:43 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-19 11:58:20 -0700 |
commit | 802ba51d690c973f6609a48069a8ac83317af4f9 (patch) | |
tree | 7600f2985f7bf65c10fc58813dad088538141d69 /lib | |
parent | f6d4396cd4665a7886082ec7f1926adb75f390f9 (diff) | |
download | perl-802ba51d690c973f6609a48069a8ac83317af4f9.tar.gz |
mktables: Add non-final fold cp table
This will be useful in regcomp.c in later commits
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 92f9d87c33..0f8268626c 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -10858,6 +10858,7 @@ sub filter_old_style_case_folding { # Create the map for simple only if are going to output it, for otherwise # it takes no part in anything we do. my $to_output_simple; + my $non_final_folds; sub setup_case_folding($) { # Read in the case foldings in CaseFolding.txt. This handles both @@ -10870,6 +10871,12 @@ sub filter_old_style_case_folding { property_ref('Case_Folding')->set_proxy_for('Simple_Case_Folding'); } + $non_final_folds = $perl->add_match_table("_Perl_Non_Final_Folds", + Perl_Extension => 1, + Fate => $INTERNAL_ONLY, + Description => "Code points that particpate in a multi-char fold not in the final position", + ); + # If we ever wanted to show that these tables were combined, a new # property method could be created, like set_combined_props() property_ref('Case_Folding')->add_comment(join_lines( <<END @@ -10922,6 +10929,12 @@ END if ($type eq 'C' || $type eq 'F' || $type eq 'I' || $type eq 'S') { $_ = "$range; Case_Folding; " . "$CMD_DELIM$REPLACE_CMD=$MULTIPLE_BEFORE$CMD_DELIM$map"; + if ($type eq 'F') { + my @string = split " ", $map; + for my $i (0 .. @string - 1 -1) { + $non_final_folds->add_range(hex $string[$i], hex $string[$i]); + } + } } else { $_ = ""; |