summaryrefslogtreecommitdiffstats
path: root/unicode/mkbidiclassnames.pl
blob: 0bb6d1eb863313545e381922ed7d3597ced8de08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/perl

use strict;
use warnings;

while (<>)
{
    last if m@^/\* BIDI_TYPE_LIST@;
}

while (<>)
{
    last if m@^}@;
    next if /\{/;
    next if /^\s*$/;
    next if m@/\*@;

    die unless /UNICODE_BIDI_TYPE_(.*),/;

    print "{\"$1\", UNICODE_BIDI_TYPE_$1},\n";
}