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

Version Path
commonmarker-0.17.7 ext/commonmarker/cmark-upstream/tools/mkcasefold.pl
commonmarker-0.17.6 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.17.5 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.17.4 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.17.2 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.17.1 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.17.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.8 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.7 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.6 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.5 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.4 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.1 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.2 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.3 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.16.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.15.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.14.15 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.14.14 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.14.13 ext/commonmarker/cmark/tools/mkcasefold.pl