diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/enc/jis/props.kwd |
Fresh start
Diffstat (limited to 'jni/ruby/enc/jis/props.kwd')
-rw-r--r-- | jni/ruby/enc/jis/props.kwd | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/jni/ruby/enc/jis/props.kwd b/jni/ruby/enc/jis/props.kwd new file mode 100644 index 0000000..f3235c0 --- /dev/null +++ b/jni/ruby/enc/jis/props.kwd @@ -0,0 +1,52 @@ +%{/* -*- c -*- */ +#define GPERF_DOWNCASE 1 +#define GPERF_CASE_STRNCMP 1 + +static inline int +gperf_case_strncmp(const char *s1, const char *s2, unsigned int n) +{ + const UChar *str = (const UChar *)s1; + const UChar *s = (const UChar *)s2; + return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n); +} + +enum onigenc_jis_ctype { + onigenc_jis_min = ONIGENC_MAX_STD_CTYPE, + onigenc_jis_hiragana, + onigenc_jis_katakana, + onigenc_jis_han, + onigenc_jis_latin, + onigenc_jis_greek, + onigenc_jis_cyrillic, + onigenc_jis_max +}; + +enum {PropertyListNum = onigenc_jis_max - onigenc_jis_min - 1}; + +static const OnigCodePoint* const PropertyList[PropertyListNum] = { + CR_Hiragana, + CR_Katakana, + CR_Han, + CR_Latin, + CR_Greek, + CR_Cyrillic, +}; + +struct enc_property { + signed char name; + unsigned char ctype; +}; + +static const struct enc_property *onig_jis_property(const char *str, unsigned int len); +%} + +struct enc_property; + +%% +hiragana, onigenc_jis_hiragana +katakana, onigenc_jis_katakana +han, onigenc_jis_han +latin, onigenc_jis_latin +greek, onigenc_jis_greek +cyrillic, onigenc_jis_cyrillic +%% |