diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-04-09 19:01:28 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-04-09 19:01:28 +0200 |
commit | 73df1a0e994f6d777591d7dae7c14f291c876fb2 (patch) | |
tree | 7a9080adec9a9473e08579cf480e8105f25b2b4d | |
parent | 13a5681b7b4528fed6f402bfca8eca505e175a77 (diff) |
Add uprop_get_nt()
-rwxr-xr-x | gen/data-files | 1 | ||||
-rwxr-xr-x | gen/prop/nt | 68 | ||||
-rw-r--r-- | include/unicode/prop.h | 8 | ||||
-rw-r--r-- | lib/unicode/prop/uprop_get_nt.c | 297 |
4 files changed, 374 insertions, 0 deletions
diff --git a/gen/data-files b/gen/data-files index a3df9f3..4ac2f07 100755 --- a/gen/data-files +++ b/gen/data-files @@ -12,6 +12,7 @@ DerivedCoreProperties.txt DerivedNormalizationProps.txt emoji/emoji-data.txt extracted/DerivedBinaryProperties.txt +extracted/DerivedNumericType.txt extracted/DerivedNumericValues.txt PropList.txt UnicodeData.txt diff --git a/gen/prop/nt b/gen/prop/nt new file mode 100755 index 0000000..569cc18 --- /dev/null +++ b/gen/prop/nt @@ -0,0 +1,68 @@ +#!/bin/sh + +set -e +cd "${0%/*}/../.." +exec >lib/unicode/prop/uprop_get_nt.c + +gawk ' +BEGIN { + FS = "( *#.*| +; +)" + + map["Decimal"] = "DE" + map["Digit"] = "DI" + map["Numeric"] = "NU" + + print "/* This file is autogenerated by gen/prop/nt; DO NOT EDIT. */" + print "" + print "#include \"__bsearch.h\"" + print "#include \"macros.h\"" + print "#include \"rune.h\"" + print "#include \"unicode/prop.h\"" + print "" +} + +/^[^#]/ { + n = split($1, a, /\.\./) + lo = strtonum("0X" a[1]) + hi = strtonum("0X" a[n]) + + for (i = lo; i <= hi; i++) { + gsub(/^; /, "", $2) + props[i] = "NT_" map[$2] + } +} + +END { + print "static constexpr enum uprop_nt lookup_lat1[] = {" + for (i = 0; i < 0x100; i++) { + if (i % 8 == 0) + printf "\t" + printf "%7s,%s", props[i] ? props[i] : "NT_NONE", i % 8 == 7 ? "\n" : " " + } + print "};" + print "" + print "static const struct {" + print "\trune lo, hi;" + print "\tenum uprop_nt val;" + print "} lookup[] = {" + + for (i = 0x100; i <= 0x10FFFF; i++) { + if (!props[i]) + continue + lo = i + while (props[lo] == props[i + 1]) + i++ + printf "\t{RUNE_C(0x%06X), RUNE_C(0x%06X), %s},\n", lo, i, props[i] + } + + print "};" + print "" + print "__MLIB_DEFINE_BSEARCH(enum uprop_nt, lookup, NT_NONE)" + print "" + print "enum uprop_nt" + print "uprop_get_nt(rune ch)" + print "{" + print "\treturn ch < lengthof(lookup_lat1) ? lookup_lat1[ch] : mlib_lookup(ch);" + print "}" +} +' data/DerivedNumericType.txt diff --git a/include/unicode/prop.h b/include/unicode/prop.h index 7325c8b..ab45bcf 100644 --- a/include/unicode/prop.h +++ b/include/unicode/prop.h @@ -48,8 +48,16 @@ enum [[clang::__flag_enum__]] uprop_gc : uint_fast32_t { GC_Z = GC_ZL | GC_ZP | GC_ZS, /* Separator */ }; +enum uprop_nt { + NT_DE, /* Decimal */ + NT_DI, /* Digit */ + NT_NONE, /* None */ + NT_NU, /* Numeric */ +}; + [[__nodiscard__, __unsequenced__]] double uprop_get_nv(rune); [[__nodiscard__, __unsequenced__]] enum uprop_gc uprop_get_gc(rune); +[[__nodiscard__, __unsequenced__]] enum uprop_nt uprop_get_nt(rune); /* PROP PREDICATES START */ [[__nodiscard__, __unsequenced__]] bool uprop_is_ahex(rune); diff --git a/lib/unicode/prop/uprop_get_nt.c b/lib/unicode/prop/uprop_get_nt.c new file mode 100644 index 0000000..c96b84c --- /dev/null +++ b/lib/unicode/prop/uprop_get_nt.c @@ -0,0 +1,297 @@ +/* This file is autogenerated by gen/prop/nt; DO NOT EDIT. */ + +#include "__bsearch.h" +#include "macros.h" +#include "rune.h" +#include "unicode/prop.h" + +static constexpr enum uprop_nt lookup_lat1[] = { + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_DE, NT_DE, NT_DE, NT_DE, NT_DE, NT_DE, NT_DE, NT_DE, + NT_DE, NT_DE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_DI, NT_DI, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_DI, NT_NONE, NT_NONE, NT_NU, NT_NU, NT_NU, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, + NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, NT_NONE, +}; + +static const struct { + rune lo, hi; + enum uprop_nt val; +} lookup[] = { + {RUNE_C(0x000660), RUNE_C(0x000669), NT_DE}, + {RUNE_C(0x0006F0), RUNE_C(0x0006F9), NT_DE}, + {RUNE_C(0x0007C0), RUNE_C(0x0007C9), NT_DE}, + {RUNE_C(0x000966), RUNE_C(0x00096F), NT_DE}, + {RUNE_C(0x0009E6), RUNE_C(0x0009EF), NT_DE}, + {RUNE_C(0x0009F4), RUNE_C(0x0009F9), NT_NU}, + {RUNE_C(0x000A66), RUNE_C(0x000A6F), NT_DE}, + {RUNE_C(0x000AE6), RUNE_C(0x000AEF), NT_DE}, + {RUNE_C(0x000B66), RUNE_C(0x000B6F), NT_DE}, + {RUNE_C(0x000B72), RUNE_C(0x000B77), NT_NU}, + {RUNE_C(0x000BE6), RUNE_C(0x000BEF), NT_DE}, + {RUNE_C(0x000BF0), RUNE_C(0x000BF2), NT_NU}, + {RUNE_C(0x000C66), RUNE_C(0x000C6F), NT_DE}, + {RUNE_C(0x000C78), RUNE_C(0x000C7E), NT_NU}, + {RUNE_C(0x000CE6), RUNE_C(0x000CEF), NT_DE}, + {RUNE_C(0x000D58), RUNE_C(0x000D5E), NT_NU}, + {RUNE_C(0x000D66), RUNE_C(0x000D6F), NT_DE}, + {RUNE_C(0x000D70), RUNE_C(0x000D78), NT_NU}, + {RUNE_C(0x000DE6), RUNE_C(0x000DEF), NT_DE}, + {RUNE_C(0x000E50), RUNE_C(0x000E59), NT_DE}, + {RUNE_C(0x000ED0), RUNE_C(0x000ED9), NT_DE}, + {RUNE_C(0x000F20), RUNE_C(0x000F29), NT_DE}, + {RUNE_C(0x000F2A), RUNE_C(0x000F33), NT_NU}, + {RUNE_C(0x001040), RUNE_C(0x001049), NT_DE}, + {RUNE_C(0x001090), RUNE_C(0x001099), NT_DE}, + {RUNE_C(0x001369), RUNE_C(0x001371), NT_DI}, + {RUNE_C(0x001372), RUNE_C(0x00137C), NT_NU}, + {RUNE_C(0x0016EE), RUNE_C(0x0016F0), NT_NU}, + {RUNE_C(0x0017E0), RUNE_C(0x0017E9), NT_DE}, + {RUNE_C(0x0017F0), RUNE_C(0x0017F9), NT_NU}, + {RUNE_C(0x001810), RUNE_C(0x001819), NT_DE}, + {RUNE_C(0x001946), RUNE_C(0x00194F), NT_DE}, + {RUNE_C(0x0019D0), RUNE_C(0x0019D9), NT_DE}, + {RUNE_C(0x0019DA), RUNE_C(0x0019DA), NT_DI}, + {RUNE_C(0x001A80), RUNE_C(0x001A89), NT_DE}, + {RUNE_C(0x001A90), RUNE_C(0x001A99), NT_DE}, + {RUNE_C(0x001B50), RUNE_C(0x001B59), NT_DE}, + {RUNE_C(0x001BB0), RUNE_C(0x001BB9), NT_DE}, + {RUNE_C(0x001C40), RUNE_C(0x001C49), NT_DE}, + {RUNE_C(0x001C50), RUNE_C(0x001C59), NT_DE}, + {RUNE_C(0x002070), RUNE_C(0x002070), NT_DI}, + {RUNE_C(0x002074), RUNE_C(0x002079), NT_DI}, + {RUNE_C(0x002080), RUNE_C(0x002089), NT_DI}, + {RUNE_C(0x002150), RUNE_C(0x002182), NT_NU}, + {RUNE_C(0x002185), RUNE_C(0x002189), NT_NU}, + {RUNE_C(0x002460), RUNE_C(0x002468), NT_DI}, + {RUNE_C(0x002469), RUNE_C(0x002473), NT_NU}, + {RUNE_C(0x002474), RUNE_C(0x00247C), NT_DI}, + {RUNE_C(0x00247D), RUNE_C(0x002487), NT_NU}, + {RUNE_C(0x002488), RUNE_C(0x002490), NT_DI}, + {RUNE_C(0x002491), RUNE_C(0x00249B), NT_NU}, + {RUNE_C(0x0024EA), RUNE_C(0x0024EA), NT_DI}, + {RUNE_C(0x0024EB), RUNE_C(0x0024F4), NT_NU}, + {RUNE_C(0x0024F5), RUNE_C(0x0024FD), NT_DI}, + {RUNE_C(0x0024FE), RUNE_C(0x0024FE), NT_NU}, + {RUNE_C(0x0024FF), RUNE_C(0x0024FF), NT_DI}, + {RUNE_C(0x002776), RUNE_C(0x00277E), NT_DI}, + {RUNE_C(0x00277F), RUNE_C(0x00277F), NT_NU}, + {RUNE_C(0x002780), RUNE_C(0x002788), NT_DI}, + {RUNE_C(0x002789), RUNE_C(0x002789), NT_NU}, + {RUNE_C(0x00278A), RUNE_C(0x002792), NT_DI}, + {RUNE_C(0x002793), RUNE_C(0x002793), NT_NU}, + {RUNE_C(0x002CFD), RUNE_C(0x002CFD), NT_NU}, + {RUNE_C(0x003007), RUNE_C(0x003007), NT_NU}, + {RUNE_C(0x003021), RUNE_C(0x003029), NT_NU}, + {RUNE_C(0x003038), RUNE_C(0x00303A), NT_NU}, + {RUNE_C(0x003192), RUNE_C(0x003195), NT_NU}, + {RUNE_C(0x003220), RUNE_C(0x003229), NT_NU}, + {RUNE_C(0x003248), RUNE_C(0x00324F), NT_NU}, + {RUNE_C(0x003251), RUNE_C(0x00325F), NT_NU}, + {RUNE_C(0x003280), RUNE_C(0x003289), NT_NU}, + {RUNE_C(0x0032B1), RUNE_C(0x0032BF), NT_NU}, + {RUNE_C(0x003405), RUNE_C(0x003405), NT_NU}, + {RUNE_C(0x003483), RUNE_C(0x003483), NT_NU}, + {RUNE_C(0x00382A), RUNE_C(0x00382A), NT_NU}, + {RUNE_C(0x003B4D), RUNE_C(0x003B4D), NT_NU}, + {RUNE_C(0x004E00), RUNE_C(0x004E00), NT_NU}, + {RUNE_C(0x004E03), RUNE_C(0x004E03), NT_NU}, + {RUNE_C(0x004E07), RUNE_C(0x004E07), NT_NU}, + {RUNE_C(0x004E09), RUNE_C(0x004E09), NT_NU}, + {RUNE_C(0x004E24), RUNE_C(0x004E24), NT_NU}, + {RUNE_C(0x004E5D), RUNE_C(0x004E5D), NT_NU}, + {RUNE_C(0x004E8C), RUNE_C(0x004E8C), NT_NU}, + {RUNE_C(0x004E94), RUNE_C(0x004E94), NT_NU}, + {RUNE_C(0x004E96), RUNE_C(0x004E96), NT_NU}, + {RUNE_C(0x004EAC), RUNE_C(0x004EAC), NT_NU}, + {RUNE_C(0x004EBF), RUNE_C(0x004EC0), NT_NU}, + {RUNE_C(0x004EDF), RUNE_C(0x004EDF), NT_NU}, + {RUNE_C(0x004EE8), RUNE_C(0x004EE8), NT_NU}, + {RUNE_C(0x004F0D), RUNE_C(0x004F0D), NT_NU}, + {RUNE_C(0x004F70), RUNE_C(0x004F70), NT_NU}, + {RUNE_C(0x004FE9), RUNE_C(0x004FE9), NT_NU}, + {RUNE_C(0x005006), RUNE_C(0x005006), NT_NU}, + {RUNE_C(0x005104), RUNE_C(0x005104), NT_NU}, + {RUNE_C(0x005146), RUNE_C(0x005146), NT_NU}, + {RUNE_C(0x005169), RUNE_C(0x005169), NT_NU}, + {RUNE_C(0x00516B), RUNE_C(0x00516B), NT_NU}, + {RUNE_C(0x00516D), RUNE_C(0x00516D), NT_NU}, + {RUNE_C(0x005341), RUNE_C(0x005341), NT_NU}, + {RUNE_C(0x005343), RUNE_C(0x005345), NT_NU}, + {RUNE_C(0x00534C), RUNE_C(0x00534C), NT_NU}, + {RUNE_C(0x0053C1), RUNE_C(0x0053C4), NT_NU}, + {RUNE_C(0x0056DB), RUNE_C(0x0056DB), NT_NU}, + {RUNE_C(0x0058F1), RUNE_C(0x0058F1), NT_NU}, + {RUNE_C(0x0058F9), RUNE_C(0x0058F9), NT_NU}, + {RUNE_C(0x005E7A), RUNE_C(0x005E7A), NT_NU}, + {RUNE_C(0x005EFE), RUNE_C(0x005EFF), NT_NU}, + {RUNE_C(0x005F0C), RUNE_C(0x005F0E), NT_NU}, + {RUNE_C(0x005F10), RUNE_C(0x005F10), NT_NU}, + {RUNE_C(0x0062D0), RUNE_C(0x0062D0), NT_NU}, + {RUNE_C(0x0062FE), RUNE_C(0x0062FE), NT_NU}, + {RUNE_C(0x00634C), RUNE_C(0x00634C), NT_NU}, + {RUNE_C(0x0067D2), RUNE_C(0x0067D2), NT_NU}, + {RUNE_C(0x006D1E), RUNE_C(0x006D1E), NT_NU}, + {RUNE_C(0x006F06), RUNE_C(0x006F06), NT_NU}, + {RUNE_C(0x007396), RUNE_C(0x007396), NT_NU}, + {RUNE_C(0x00767E), RUNE_C(0x00767E), NT_NU}, + {RUNE_C(0x007695), RUNE_C(0x007695), NT_NU}, + {RUNE_C(0x0079ED), RUNE_C(0x0079ED), NT_NU}, + {RUNE_C(0x008086), RUNE_C(0x008086), NT_NU}, + {RUNE_C(0x00842C), RUNE_C(0x00842C), NT_NU}, + {RUNE_C(0x008CAE), RUNE_C(0x008CAE), NT_NU}, + {RUNE_C(0x008CB3), RUNE_C(0x008CB3), NT_NU}, + {RUNE_C(0x008D30), RUNE_C(0x008D30), NT_NU}, + {RUNE_C(0x00920E), RUNE_C(0x00920E), NT_NU}, + {RUNE_C(0x0094A9), RUNE_C(0x0094A9), NT_NU}, + {RUNE_C(0x009621), RUNE_C(0x009621), NT_NU}, + {RUNE_C(0x009646), RUNE_C(0x009646), NT_NU}, + {RUNE_C(0x00964C), RUNE_C(0x00964C), NT_NU}, + {RUNE_C(0x009678), RUNE_C(0x009678), NT_NU}, + {RUNE_C(0x0096F6), RUNE_C(0x0096F6), NT_NU}, + {RUNE_C(0x00A620), RUNE_C(0x00A629), NT_DE}, + {RUNE_C(0x00A6E6), RUNE_C(0x00A6EF), NT_NU}, + {RUNE_C(0x00A830), RUNE_C(0x00A835), NT_NU}, + {RUNE_C(0x00A8D0), RUNE_C(0x00A8D9), NT_DE}, + {RUNE_C(0x00A900), RUNE_C(0x00A909), NT_DE}, + {RUNE_C(0x00A9D0), RUNE_C(0x00A9D9), NT_DE}, + {RUNE_C(0x00A9F0), RUNE_C(0x00A9F9), NT_DE}, + {RUNE_C(0x00AA50), RUNE_C(0x00AA59), NT_DE}, + {RUNE_C(0x00ABF0), RUNE_C(0x00ABF9), NT_DE}, + {RUNE_C(0x00F96B), RUNE_C(0x00F96B), NT_NU}, + {RUNE_C(0x00F973), RUNE_C(0x00F973), NT_NU}, + {RUNE_C(0x00F978), RUNE_C(0x00F978), NT_NU}, + {RUNE_C(0x00F9B2), RUNE_C(0x00F9B2), NT_NU}, + {RUNE_C(0x00F9D1), RUNE_C(0x00F9D1), NT_NU}, + {RUNE_C(0x00F9D3), RUNE_C(0x00F9D3), NT_NU}, + {RUNE_C(0x00F9FD), RUNE_C(0x00F9FD), NT_NU}, + {RUNE_C(0x00FF10), RUNE_C(0x00FF19), NT_DE}, + {RUNE_C(0x010107), RUNE_C(0x010133), NT_NU}, + {RUNE_C(0x010140), RUNE_C(0x010178), NT_NU}, + {RUNE_C(0x01018A), RUNE_C(0x01018B), NT_NU}, + {RUNE_C(0x0102E1), RUNE_C(0x0102FB), NT_NU}, + {RUNE_C(0x010320), RUNE_C(0x010323), NT_NU}, + {RUNE_C(0x010341), RUNE_C(0x010341), NT_NU}, + {RUNE_C(0x01034A), RUNE_C(0x01034A), NT_NU}, + {RUNE_C(0x0103D1), RUNE_C(0x0103D5), NT_NU}, + {RUNE_C(0x0104A0), RUNE_C(0x0104A9), NT_DE}, + {RUNE_C(0x010858), RUNE_C(0x01085F), NT_NU}, + {RUNE_C(0x010879), RUNE_C(0x01087F), NT_NU}, + {RUNE_C(0x0108A7), RUNE_C(0x0108AF), NT_NU}, + {RUNE_C(0x0108FB), RUNE_C(0x0108FF), NT_NU}, + {RUNE_C(0x010916), RUNE_C(0x01091B), NT_NU}, + {RUNE_C(0x0109BC), RUNE_C(0x0109BD), NT_NU}, + {RUNE_C(0x0109C0), RUNE_C(0x0109CF), NT_NU}, + {RUNE_C(0x0109D2), RUNE_C(0x0109FF), NT_NU}, + {RUNE_C(0x010A40), RUNE_C(0x010A43), NT_DI}, + {RUNE_C(0x010A44), RUNE_C(0x010A48), NT_NU}, + {RUNE_C(0x010A7D), RUNE_C(0x010A7E), NT_NU}, + {RUNE_C(0x010A9D), RUNE_C(0x010A9F), NT_NU}, + {RUNE_C(0x010AEB), RUNE_C(0x010AEF), NT_NU}, + {RUNE_C(0x010B58), RUNE_C(0x010B5F), NT_NU}, + {RUNE_C(0x010B78), RUNE_C(0x010B7F), NT_NU}, + {RUNE_C(0x010BA9), RUNE_C(0x010BAF), NT_NU}, + {RUNE_C(0x010CFA), RUNE_C(0x010CFF), NT_NU}, + {RUNE_C(0x010D30), RUNE_C(0x010D39), NT_DE}, + {RUNE_C(0x010E60), RUNE_C(0x010E68), NT_DI}, + {RUNE_C(0x010E69), RUNE_C(0x010E7E), NT_NU}, + {RUNE_C(0x010F1D), RUNE_C(0x010F26), NT_NU}, + {RUNE_C(0x010F51), RUNE_C(0x010F54), NT_NU}, + {RUNE_C(0x010FC5), RUNE_C(0x010FCB), NT_NU}, + {RUNE_C(0x011052), RUNE_C(0x01105A), NT_DI}, + {RUNE_C(0x01105B), RUNE_C(0x011065), NT_NU}, + {RUNE_C(0x011066), RUNE_C(0x01106F), NT_DE}, + {RUNE_C(0x0110F0), RUNE_C(0x0110F9), NT_DE}, + {RUNE_C(0x011136), RUNE_C(0x01113F), NT_DE}, + {RUNE_C(0x0111D0), RUNE_C(0x0111D9), NT_DE}, + {RUNE_C(0x0111E1), RUNE_C(0x0111F4), NT_NU}, + {RUNE_C(0x0112F0), RUNE_C(0x0112F9), NT_DE}, + {RUNE_C(0x011450), RUNE_C(0x011459), NT_DE}, + {RUNE_C(0x0114D0), RUNE_C(0x0114D9), NT_DE}, + {RUNE_C(0x011650), RUNE_C(0x011659), NT_DE}, + {RUNE_C(0x0116C0), RUNE_C(0x0116C9), NT_DE}, + {RUNE_C(0x011730), RUNE_C(0x011739), NT_DE}, + {RUNE_C(0x01173A), RUNE_C(0x01173B), NT_NU}, + {RUNE_C(0x0118E0), RUNE_C(0x0118E9), NT_DE}, + {RUNE_C(0x0118EA), RUNE_C(0x0118F2), NT_NU}, + {RUNE_C(0x011950), RUNE_C(0x011959), NT_DE}, + {RUNE_C(0x011C50), RUNE_C(0x011C59), NT_DE}, + {RUNE_C(0x011C5A), RUNE_C(0x011C6C), NT_NU}, + {RUNE_C(0x011D50), RUNE_C(0x011D59), NT_DE}, + {RUNE_C(0x011DA0), RUNE_C(0x011DA9), NT_DE}, + {RUNE_C(0x011F50), RUNE_C(0x011F59), NT_DE}, + {RUNE_C(0x011FC0), RUNE_C(0x011FD4), NT_NU}, + {RUNE_C(0x012400), RUNE_C(0x01246E), NT_NU}, + {RUNE_C(0x016A60), RUNE_C(0x016A69), NT_DE}, + {RUNE_C(0x016AC0), RUNE_C(0x016AC9), NT_DE}, + {RUNE_C(0x016B50), RUNE_C(0x016B59), NT_DE}, + {RUNE_C(0x016B5B), RUNE_C(0x016B61), NT_NU}, + {RUNE_C(0x016E80), RUNE_C(0x016E96), NT_NU}, + {RUNE_C(0x01D2C0), RUNE_C(0x01D2D3), NT_NU}, + {RUNE_C(0x01D2E0), RUNE_C(0x01D2F3), NT_NU}, + {RUNE_C(0x01D360), RUNE_C(0x01D378), NT_NU}, + {RUNE_C(0x01D7CE), RUNE_C(0x01D7FF), NT_DE}, + {RUNE_C(0x01E140), RUNE_C(0x01E149), NT_DE}, + {RUNE_C(0x01E2F0), RUNE_C(0x01E2F9), NT_DE}, + {RUNE_C(0x01E4F0), RUNE_C(0x01E4F9), NT_DE}, + {RUNE_C(0x01E8C7), RUNE_C(0x01E8CF), NT_NU}, + {RUNE_C(0x01E950), RUNE_C(0x01E959), NT_DE}, + {RUNE_C(0x01EC71), RUNE_C(0x01ECAB), NT_NU}, + {RUNE_C(0x01ECAD), RUNE_C(0x01ECAF), NT_NU}, + {RUNE_C(0x01ECB1), RUNE_C(0x01ECB4), NT_NU}, + {RUNE_C(0x01ED01), RUNE_C(0x01ED2D), NT_NU}, + {RUNE_C(0x01ED2F), RUNE_C(0x01ED3D), NT_NU}, + {RUNE_C(0x01F100), RUNE_C(0x01F10A), NT_DI}, + {RUNE_C(0x01F10B), RUNE_C(0x01F10C), NT_NU}, + {RUNE_C(0x01FBF0), RUNE_C(0x01FBF9), NT_DE}, + {RUNE_C(0x020001), RUNE_C(0x020001), NT_NU}, + {RUNE_C(0x020064), RUNE_C(0x020064), NT_NU}, + {RUNE_C(0x0200E2), RUNE_C(0x0200E2), NT_NU}, + {RUNE_C(0x020121), RUNE_C(0x020121), NT_NU}, + {RUNE_C(0x02092A), RUNE_C(0x02092A), NT_NU}, + {RUNE_C(0x020983), RUNE_C(0x020983), NT_NU}, + {RUNE_C(0x02098C), RUNE_C(0x02098C), NT_NU}, + {RUNE_C(0x02099C), RUNE_C(0x02099C), NT_NU}, + {RUNE_C(0x020AEA), RUNE_C(0x020AEA), NT_NU}, + {RUNE_C(0x020AFD), RUNE_C(0x020AFD), NT_NU}, + {RUNE_C(0x020B19), RUNE_C(0x020B19), NT_NU}, + {RUNE_C(0x022390), RUNE_C(0x022390), NT_NU}, + {RUNE_C(0x022998), RUNE_C(0x022998), NT_NU}, + {RUNE_C(0x023B1B), RUNE_C(0x023B1B), NT_NU}, + {RUNE_C(0x02626D), RUNE_C(0x02626D), NT_NU}, + {RUNE_C(0x02F890), RUNE_C(0x02F890), NT_NU}, +}; + +__MLIB_DEFINE_BSEARCH(enum uprop_nt, lookup, NT_NONE) + +enum uprop_nt +uprop_get_nt(rune ch) +{ + return ch < lengthof(lookup_lat1) ? lookup_lat1[ch] : mlib_lookup(ch); +} |