summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0dc4a61)
This code is moved later in the process. This is in preparation for
mktables generating tables in the native character set. By moving it to
later, the translation to native has already been done, and special
coding need not be done.
This also caught 7 code points that were omitted somehow in the previous
logic
# 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;
# 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;
sub setup_case_folding($) {
# Read in the case foldings in CaseFolding.txt. This handles both
sub setup_case_folding($) {
# Read in the case foldings in CaseFolding.txt. This handles both
property_ref('Case_Folding')->set_proxy_for('Simple_Case_Folding');
}
property_ref('Case_Folding')->set_proxy_for('Simple_Case_Folding');
}
- $all_folds = $perl->add_match_table("_Perl_Any_Folds",
- Perl_Extension => 1,
- Fate => $INTERNAL_ONLY,
- Description => "Code points that particpate in some fold",
- );
-
# 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
# 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
# so that _swash_inversion_hash() is able to construct closures
# without having to worry about F mappings.
if ($type eq 'C' || $type eq 'F' || $type eq 'I' || $type eq 'S') {
# so that _swash_inversion_hash() is able to construct closures
# without having to worry about F mappings.
if ($type eq 'C' || $type eq 'F' || $type eq 'I' || $type eq 'S') {
- my $from = hex $range; # Assumes range is single
- $all_folds->add_range($from, $from);
$_ = "$range; Case_Folding; "
. "$CMD_DELIM$REPLACE_CMD=$MULTIPLE_BEFORE$CMD_DELIM$map";
$_ = "$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) {
- my $decimal = hex $string[$i];
- $all_folds->add_range($decimal, $decimal);
- }
- }
- else {
- $all_folds->add_range(hex $map, hex $map);
- }
}
$PosixXDigit->add_description('[0-9A-Fa-f]');
}
$PosixXDigit->add_description('[0-9A-Fa-f]');
+ my $any_folds = $perl->add_match_table("_Perl_Any_Folds",
+ Description => "Code points that particpate in some fold",
+ );
+ #
+ foreach my $range (property_ref('Case_Folding')->ranges) {
+ $any_folds->add_range($range->start, $range->end);
+ foreach my $hex_code_point (split " ", $range->value) {
+ my $code_point = hex $hex_code_point;
+ $any_folds->add_range($code_point, $code_point);
+ }
+ }
+
my $dt = property_ref('Decomposition_Type');
$dt->add_match_table('Non_Canon', Full_Name => 'Non_Canonical',
Initialize => ~ ($dt->table('None') + $dt->table('Canonical')),
my $dt = property_ref('Decomposition_Type');
$dt->add_match_table('Non_Canon', Full_Name => 'Non_Canonical',
Initialize => ~ ($dt->table('None') + $dt->table('Canonical')),