-# expect input data source at command line
-@ARGV or die "Specify input source file or - for STDIN\n";
-
-# skip everything until a character indented by 1 space (table start)
-do {
- $_ = readline;
- defined or die "Premature input end";
-} until /^\s\S/;
-
-my @t = $_; # add first line (already read, assume it's ok)
-
-# read the rest of the character table
-while ($_ = readline) {
- # check for table end (chapter 4)
- last if /^\d/;
-
- # parse table lines (ignore (unindented) page break)
- next unless s/^ //;
- chomp;
-
- # add the line to @t
- if (s/^ {15}/ /) {
- # continuation line (add to last entry)
- $t[-1] .= $_;
- }
- else {
- # add a new entry
- push @t, $_;
- }
-}
-
-# create a hash of desired input
-my %di;
-for (@t) {
- my ($mnem, $char, $name) = split / +/, $_, 3;
- next if length $mnem != 2;
- $di{$mnem} = hex $char;
-}
-
-# XXX
-my %trans = (