3 # Compile WordBreak.txt into C array declarations.
5 # The array's structure is [firstchar, lastchar, class], giving the
6 # linebreaking "class" for unicode character range firstchar-lastchar.
8 # The ranges are sorted in numerical order.
10 # An array gets generated for each block of 4096 unicode characters.
12 # Finally, two arrays get declared: a pointer to an array for each 4096
13 # unicode character block, and the number of elements in the array.
15 # The pointer is NULL for each block of 4096 unicode characters that is not
16 # defined in WordBreak.txt
22 my $obj=mkcommon
->new;
24 open(F
, "<WordBreakProperty.txt") || die;
28 while (defined($_=<F
>))
32 next unless /^([0-9A-F]+)(\.\.([0-9A-F]+))?\s*\;\s*([^\s]+)\s*/;
43 push @table, [$f, $l, $t];
48 $obj->range($$_[0], $$_[1], "UNICODE_WB_$$_[2]");
50 } sort { $$a[0] <=> $$b[0] } @table;