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.7.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.6.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.5.1 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.5.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.4.1 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.4.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.3.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.2.1 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.2.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.1.3 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.1.2 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.1.1 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.1.0 ext/commonmarker/cmark/tools/mkcasefold.pl
commonmarker-0.0.1 ext/commonmarker/cmark/tools/mkcasefold.pl