mkunidata.rb

Path: tools/mkunidata.rb
Last Update: Thu May 02 07:34:33 +0000 2013

if $KCODE != ‘UTF8‘

  raise "$KCODE must be UTF8"

end

Methods

Constants

HEAD = <<EOS /* * UnicodeData * Copyright 1999, 2004, 2010, 2012 by yoshidam * */ #ifndef _UNIDATA_MAP #define _UNIDATA_MAP EOS   if $KCODE != ‘UTF8‘
  raise "$KCODE must be UTF8"

end

HEAD1 = <<EOS enum GeneralCategory { /* Letter */ c_Lu = 1, c_Ll, c_Lt, c_LC, c_Lm, c_Lo, /* Mark */ c_Mn, c_Mc, c_Me, /* Number */ c_Nd, c_Nl, c_No, /* Punctuation */ c_Pc, c_Pd, c_Ps, c_Pe, c_Pi, c_Pf, c_Po, /* Symbol */ c_Sm, c_Sc, c_Sk, c_So, /* Separator */ c_Zs, c_Zl, c_Zp, /* Other */ c_Cc, c_Cf, c_Cs, c_Co, c_Cn }; const char* const gencat_abbr[] = { "", /* 0 */ /* Letter */ "Lu", "Ll", "Lt", "LC", "Lm", "Lo", /* Mark */ "Mn", "Mc", "Me", /* Number */ "Nd", "Nl", "No", /* Punctuation */ "Pc", "Pd", "Ps", "Pe", "Pi", "Pf", "Po", /* Symbol */ "Sm", "Sc", "Sk", "So", /* Separator */ "Zs", "Zl", "Zp", /* Other */ "Cc", "Cf", "Cs", "Co", "Cn" }; const char* const gencat_long[] = { "", "Uppercase_Letter", "Lowercase_Letter", "Titlecase_Letter", "Cased_Letter", "Modifier_Letter", "Other_Letter", "Nonspacing_Mark", "Spacing_Mark", "Enclosing_Mark", "Decimal_Number", "Letter_Number", "Other_Number", "Connector_Punctuation", "Dash_Punctuation", "Open_Punctuation", "Close_Punctuation", "Initial_Punctuation", "Final_Punctuation", "Other_Punctuation", "Math_Symbol", "Currency_Symbol", "Modifier_Symbol", "Other_Symbol", "Space_Separator", "Line_Separator", "Paragraph_Separator", "Control", "Format", "Surrogate", "Private_Use", "Unassigned" }; enum EastAsianWidth { w_N = 1, w_A, w_H, w_W, w_F, w_Na }; struct unicode_data { const int code; const char* const canon; const char* const compat; const char* const uppercase; const char* const lowercase; const char* const titlecase; const unsigned char combining_class; const unsigned char exclusion; const unsigned char general_category; const unsigned char east_asian_width; }; static const struct unicode_data unidata[] = { EOS
TAIL = <<EOS }; #endif EOS

Public Instance methods

[Validate]