X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/5ce59b6b1ce1ff6ba7597a64d8a4779d7db43bd0..f00c1e5c4de7325c9d5d851a61355fe8638cca95:/apl.plp diff --git a/apl.plp b/apl.plp index 44adb74..52ea685 100644 --- a/apl.plp +++ b/apl.plp @@ -9,6 +9,20 @@ Html({ '], stylesheet => [qw'light circus dark red'], data => [qw'apl.inc.pl'], + raw => <<'EOT', + +EOT }); use Shiar_Sheet::FormatChar; @@ -21,7 +35,8 @@ my @ops = do 'apl.inc.pl';

APL Symbols

- +
+ - + <: for my $op (@ops) { - my ($chr, $monad, $dyad) = @{$op}; + $op or do { + print "\n"; + next; + }; + + my ($chr, $dyad, $monad) = @{$op}; ($chr, my $altkey) = split /\n/, $chr; my $codepoint = ord $chr; my $ascii = $codepoint <= 127; my $info = $glyphs->glyph_info($codepoint); my ($class, $name, $mnem, $html, $string) = @{$info}; - printf '\n"; } :>
op input @@ -29,21 +44,25 @@ my @ops = do 'apl.inc.pl';
⎈ dihtml - monadic - dyadic -
monadic + dyadic +
%s'."\n", $chr, EscapeHTML($name || '?'), $class; + printf '
%s', $chr, EscapeHTML($name || '?'), $class; printf '%s', @{$_} for ( [$ascii ? 'l5' : defined $altkey ? 'l4' : 'l3', $altkey], [defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : $ascii ? 'l5' : 'l1', @@ -51,9 +70,11 @@ for my $op (@ops) { [defined $html ? 'l4' : $ascii ? 'l5' : 'l1', $html // "#$codepoint"], ); printf( - defined $_ ? '%s' : '', - map { EscapeHTML($_) } split /\n/, $_, 2 + defined $_ ? '%s' : '', + map { !!$_->[1] && qq( title="$_->[1]"), $_->[0] } + [map { EscapeHTML($_) } split /\n/, $_, 2] ) for $monad, $dyad; + print "