Sha256: af41f4dab789b28be361e9c016a5dc6a43d68ddbb7539387c09c879ae7936b4f
Contents?: true
Size: 525 Bytes
Versions: 54
Compression:
Stored size: 525 Bytes
Contents
binmode STDOUT; print(" switch (c) {\n"); my $lastchar = ""; while (<STDIN>) { if (/^[A-F0-9]/ and / [CF]; /) { my ($char, $type, $subst) = m/([A-F0-9]+); ([CF]); ([^;]+)/; if ($char eq $lastchar) { break; } my @subst = $subst =~ m/(\w+)/g; printf(" case 0x%s:\n", $char); foreach (@subst) { printf(" bufpush(0x%s);\n", $_); } printf(" break;\n"); $lastchar = $char; } } printf(" default:\n"); printf(" bufpush(c);\n"); print(" }\n");
Version data entries
54 entries across 54 versions & 1 rubygems