Skip to content

Commit

Permalink
Unicode::UCD: Don't depend on a file current syntax
Browse files Browse the repository at this point in the history
This generated file will be changed in a future commit.  This shouldn't
have been relying on its syntax anyway, but the value it returns.
  • Loading branch information
khwilliamson committed Sep 1, 2021
1 parent e3d65f9 commit 3c2792c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion charclass_invlists.h
Original file line number Diff line number Diff line change
Expand Up @@ -419852,7 +419852,7 @@ static const U8 WB_table[23][23] = {
#define MAX_FOLD_FROMS 3

/* Generated from:
* f328838dc3474cf31eefa0e8918c2da5b317cb72c373c35886906ac1460879eb lib/Unicode/UCD.pm
* 688d673ec947f7ccf898b4eae9848139d4d33676b688dee54f449f8bf9d3bbd2 lib/Unicode/UCD.pm
* ce96627d4fc91b4fd886c409caeb9b76cf7bd345e12f05c6701add7f233f6437 lib/unicore/ArabicShaping.txt
* 0e69eef3da722cc104522d8372e86d5b86bb7afcc761b0c991e39e832294946d lib/unicore/BidiBrackets.txt
* a00d9d21585106a52113fb7b1d3d0373a5835be72e76862fb559ebddd474d70e lib/unicore/BidiMirroring.txt
Expand Down
32 changes: 15 additions & 17 deletions lib/Unicode/UCD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2346,25 +2346,23 @@ my %NAMEDSEQ;

sub _namedseq {
unless (%NAMEDSEQ) {
my $namedseqfh = openunicode("Name.pl");
local $_;
local $/ = "\n";
while (<$namedseqfh>) {
next if m/ ^ \s* \# /x;

# Each entry is currently two lines. The first contains the code
my @list = split "\n", do "unicore/Name.pl";
for (my $i = 0; $i < @list; $i += 3) {
# Each entry is currently three lines. The first contains the code
# points in the sequence separated by spaces. If this entry
# doesn't have spaces, it isn't a named sequence.
if (/^ [0-9A-F]{4,5} (?: \ [0-9A-F]{4,5} )+ $ /x) {
my $sequence = $_;
chomp $sequence;

# And the second is the name
my $name = <$namedseqfh>;
chomp $name;
my @s = map { chr(hex($_)) } split(' ', $sequence);
$NAMEDSEQ{$name} = join("", @s);
}
next unless $list[$i] =~ /^ [0-9A-F]{4,5} (?: \ [0-9A-F]{4,5} )+ $ /x;

my $sequence = $list[$i];
chomp $sequence;

# And the second is the name
my $name = $list[$i+1];
chomp $name;
my @s = map { chr(hex($_)) } split(' ', $sequence);
$NAMEDSEQ{$name} = join("", @s);

# And the third is empty
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/unicore/uni_keywords.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@
1;

# Generated from:
# f328838dc3474cf31eefa0e8918c2da5b317cb72c373c35886906ac1460879eb lib/Unicode/UCD.pm
# 688d673ec947f7ccf898b4eae9848139d4d33676b688dee54f449f8bf9d3bbd2 lib/Unicode/UCD.pm
# ce96627d4fc91b4fd886c409caeb9b76cf7bd345e12f05c6701add7f233f6437 lib/unicore/ArabicShaping.txt
# 0e69eef3da722cc104522d8372e86d5b86bb7afcc761b0c991e39e832294946d lib/unicore/BidiBrackets.txt
# a00d9d21585106a52113fb7b1d3d0373a5835be72e76862fb559ebddd474d70e lib/unicore/BidiMirroring.txt
Expand Down
2 changes: 1 addition & 1 deletion regcharclass.h
Original file line number Diff line number Diff line change
Expand Up @@ -3714,7 +3714,7 @@
#endif /* PERL_REGCHARCLASS_H_ */

/* Generated from:
* f328838dc3474cf31eefa0e8918c2da5b317cb72c373c35886906ac1460879eb lib/Unicode/UCD.pm
* 688d673ec947f7ccf898b4eae9848139d4d33676b688dee54f449f8bf9d3bbd2 lib/Unicode/UCD.pm
* ce96627d4fc91b4fd886c409caeb9b76cf7bd345e12f05c6701add7f233f6437 lib/unicore/ArabicShaping.txt
* 0e69eef3da722cc104522d8372e86d5b86bb7afcc761b0c991e39e832294946d lib/unicore/BidiBrackets.txt
* a00d9d21585106a52113fb7b1d3d0373a5835be72e76862fb559ebddd474d70e lib/unicore/BidiMirroring.txt
Expand Down
2 changes: 1 addition & 1 deletion uni_keywords.h
Original file line number Diff line number Diff line change
Expand Up @@ -7494,7 +7494,7 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
#endif /* #if defined(PERL_CORE) || defined(PERL_EXT_RE_BUILD) */

/* Generated from:
* f328838dc3474cf31eefa0e8918c2da5b317cb72c373c35886906ac1460879eb lib/Unicode/UCD.pm
* 688d673ec947f7ccf898b4eae9848139d4d33676b688dee54f449f8bf9d3bbd2 lib/Unicode/UCD.pm
* ce96627d4fc91b4fd886c409caeb9b76cf7bd345e12f05c6701add7f233f6437 lib/unicore/ArabicShaping.txt
* 0e69eef3da722cc104522d8372e86d5b86bb7afcc761b0c991e39e832294946d lib/unicore/BidiBrackets.txt
* a00d9d21585106a52113fb7b1d3d0373a5835be72e76862fb559ebddd474d70e lib/unicore/BidiMirroring.txt
Expand Down

0 comments on commit 3c2792c

Please sign in to comment.