X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/e10ebeeeccd813dd3d9ff3e23b3338036deb66b1..c133e6ad3027e095811931f3e0d21b818865e0e8:/apl.plp diff --git a/apl.plp b/apl.plp index 0e4ddcf..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,35 +35,46 @@ 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 + input meaning
⎈ 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', EscapeHTML($mnem) // sprintf('%s%0*X', $codepoint < 256 ? (x => 2) : (u => 4), $codepoint)], [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 "