git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
charset: link specific pages back to overview
[sheet.git]
/
tools
/
mkdigraphs-shiar
diff --git
a/tools/mkdigraphs-shiar
b/tools/mkdigraphs-shiar
index 05399b0aecb12fa911f952f3566173a918452e85..55134b4bb7487b4a52ff8a790a6fa6d89c16b9b6 100755
(executable)
--- a/
tools/mkdigraphs-shiar
+++ b/
tools/mkdigraphs-shiar
@@
-1,10
+1,9
@@
#!/usr/bin/env perl
#!/usr/bin/env perl
-use 5.010;
-use strict;
+use 5.014;
use warnings;
use open IN => ':utf8', ':std';
use warnings;
use open IN => ':utf8', ':std';
-our $VERSION = '1.0
1
';
+our $VERSION = '1.0
3
';
my $di = do "data/digraphs-rfc.inc.pl"
or warn "official digraphs not included for comparison: ", $@ // $!;
my $di = do "data/digraphs-rfc.inc.pl"
or warn "official digraphs not included for comparison: ", $@ // $!;
@@
-12,9
+11,9
@@
my $di = do "data/digraphs-rfc.inc.pl"
say "# automatically generated by $0";
say '+{';
for (readline) {
say "# automatically generated by $0";
say '+{';
for (readline) {
- my ($mnem, $c
hr) = m{^([!"%'-Z_a-z]{2}) (.
)} or next;
+ my ($mnem, $c
p, $chr) = m{^([!"%'-Z_a-z]{2}) (?:\\(\d+)|(.)
)} or next;
warn("$mnem already defined"), next if defined $di->{$mnem};
warn("$mnem already defined"), next if defined $di->{$mnem};
- my $chrstr = sprintf '"\x{%x}"', ord $chr;
+ my $chrstr = sprintf '"\x{%x}"',
$cp //
ord $chr;
say "q{$mnem} => $chrstr,";
}
say '}';
say "q{$mnem} => $chrstr,";
}
say '}';