/* This file was converted by gperf_fold_key_conv.py from gperf output file. */ /* ANSI-C code produced by gperf version 3.1 */ /* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold1_key unicode_fold1_key.gperf */ /* Computed positions: -k'1-3' */ /* This gperf source file was generated by make_unicode_fold_data.py */ /*- * Copyright (c) 2017-2020 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "regint.h" #define TOTAL_KEYWORDS 1356 #define MIN_WORD_LENGTH 3 #define MAX_WORD_LENGTH 3 #define MIN_HASH_VALUE 3 #define MAX_HASH_VALUE 1776 /* maximum key range = 1774, duplicates = 0 */ #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif /*ARGSUSED*/ static unsigned int hash(OnigCodePoint codes[]) { static const unsigned short asso_values[] = { 4, 2, 147, 16, 1, 13, 1251, 864, 1234, 725, 1206, 95, 9, 82, 1390, 80, 8, 75, 1383, 6, 1203, 643, 1202, 602, 151, 68, 1380, 67, 1376, 158, 0, 11, 1375, 3, 733, 278, 23, 424, 660, 320, 640, 20, 635, 34, 5, 29, 916, 27, 630, 0, 906, 1363, 899, 1360, 470, 1355, 623, 902, 610, 230, 1192, 1335, 1134, 1090, 986, 1325, 890, 883, 456, 597, 285, 158, 590, 477, 583, 42, 576, 1449, 447, 1448, 440, 1317, 426, 1440, 400, 1438, 327, 1426, 567, 1412, 386, 1454, 458, 797, 854, 1340, 965, 66, 232, 413, 204, 1424, 226, 1419, 190, 1185, 379, 1293, 198, 1196, 175, 209, 561, 362, 528, 1306, 257, 1174, 240, 1292, 508, 1171, 484, 1237, 699, 865, 850, 488, 679, 755, 420, 639, 1149, 105, 691, 857, 1168, 77, 809, 715, 799, 3, 1286, 166, 1421, 0, 1415, 1777, 1228, 460, 706, 1, 367, 1777, 1337, 1777, 1254, 57, 1271, 1777, 384, 345, 1386, 52, 1159, 40, 218, 180, 1151, 33, 1238, 276, 1220, 14, 1401, 682, 1142, 610, 1284, 129, 1125, 510, 1277, 1436, 1122, 991, 1042, 499, 842, 448, 999, 346, 830, 0, 823, 867, 1108, 768, 732, 177, 1105, 1100, 1093, 1081, 811, 777, 1078, 1074, 1061, 1058, 1050, 789, 353, 1018, 548, 1006, 517, 988, 334, 765, 166, 753, 138, 743, 100, 969, 87, 720, 49, 975, 75, 965, 62, 411, 126, 955, 113, 1267, 317, 943, 304, 679, 293, 1261, 714, 937, 275, 490, 263, 469, 395, 1347, 931, 208, 921, 80, 542, 11, 246 }; return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+3] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)]; } int onigenc_unicode_fold1_key(OnigCodePoint codes[]) { static const short int wordlist[] = { -1, -1, -1, 3438, 1906, 1867, 210, 171, 3423, 1927, 1690, 231, 1885, 1879, 189, 183, 2240, 1315, 1276, 165, 792, 2261, 1336, 1594, 1630, 1294, 1288, 1915, 2243, 219, 3432, 2237, 3426, 2981, 2903, 2297, 2990, 3420, 2282, 2948, 1324, 2939, 2927, 1618, 2984, 3516, 2906, 974, 273, 2900, 1606, 2648, 3567, 2189, 1228, 459, 2999, 80, 2885, 1795, 3747, 1513, 1600, 378, 2438, 3579, 2195, 1234, 465, 860, 92, 1041, 1807, 3759, 1525, 2714, 2549, 2441, 3573, 2192, 1231, 462, 866, 86, 2888, 1801, 3753, 1519, 159, 2561, 3561, 2186, 1225, 456, 1459, 863, 2882, 1789, 3741, 1507, 2972, 2966, 2555, 3555, 2183, 1222, 453, 857, 2942, 2879, 1783, 3735, 1501, 2936, 2543, 2930, 3591, 2201, 1240, 471, 854, 105, 1447, 1819, 3771, 1537, 3363, 2537, 2924, 3585, 2198, 1237, 468, 872, 99, 399, 1813, 3765, 1531, 1648, 2573, 3549, 2180, 1219, 2423, -1, 869, 2876, 1777, 3729, 1495, 541, 502, 2567, 697, 1897, 559, 201, 851, 520, 514, 3504, 1864, 962, 267, 2531, 2276, 2636, 1306, 3543, 2177, 1216, 366, 2339, -1, 2873, 1771, 3723, 1489, 2027, 1063, 324, 1183, 27, 2963, 3276, 848, 1708, 3660, 3141, 1612, 2978, 1378, 2525, 2018, 1054, 315, 810, 12, 2720, -1, -1, 2024, 1060, 321, 2372, 4095, 1360, 2011, 1047, 309, 3642, 0, 2717, -1, 1372, 153, 31, 2732, 2360, 1588, 1348, 2096, 1135, 387, -1, 1381, 2792, 1609, -1, 2015, 1050, 312, 3468, 6, 922, 2008, 1044, 306, 2600, 3894, 2366, 3351, 1354, 2039, 1075, 336, 2456, 52, 2735, 2234, 1273, 499, 3888, 168, 2390, 682, 1402, 1597, -1, 718, 2036, 1072, 333, 2450, 46, 3627, 2219, 1258, 487, -1, 141, 2384, 1855, 1396, 1573, -1, 715, 3621, 2216, 1255, 483, 393, 135, 2897, 1849, 1624, 1567, 3501, 1966, 959, 3882, -1, 2279, 2633, 887, 3609, 2210, 1249, 480, 2336, 123, 532, 1837, 3789, 1555, -1, 3603, 2207, 1246, 477, 2996, 117, 881, 1831, 3783, 1549, 703, -1, 3876, 3597, 2204, 1243, 474, 878, 111, 658, 1825, 3777, 1543, 3813, 1990, 1008, 288, -1, 2291, 2681, 875, 2174, 1213, -1, 643, 2348, 2870, 1765, 3717, 1483, -1, -1, 652, 3267, 381, 3930, 3008, 845, 637, 1684, 2165, 1204, 3237, 661, 2519, 2861, 1747, 3699, 1465, 785, 3912, 2432, 3348, 37, 2090, 1114, 372, 3228, 3924, 2771, 640, -1, 1387, 2501, 3900, 3234, 2021, 1057, 318, 3933, 18, 3222, 1126, 1996, 1020, 294, 2783, 2378, 2693, 1366, 3084, 3633, 2222, 1261, 2354, 3297, 3906, 1987, 1002, 285, 1579, 667, 2675, 3225, 3396, 3075, 4029, 3582, 2345, 3219, 3954, 4014, 96, 3081, 1810, 3762, 1528, 2057, 1093, 3069, 2492, 2357, 3537, 1984, 996, 282, 4005, 3948, 2669, -1, 1438, 2564, 2285, 4023, -1, 4017, 3531, 1981, 990, 279, 4011, 3072, 2663, 3525, 1978, 984, 276, 3066, -1, 2657, 3002, 1678, 3495, 1963, 950, 1999, 1026, 297, 2627, 369, 2699, 778, 3177, 3408, 2330, 3630, 3453, 1942, 906, 243, 144, 613, 2585, 3510, 1576, 968, 270, 3390, 2312, 2642, 3870, 2045, 1081, 342, 2468, 65, 3624, 348, 2483, 712, -1, 138, 2402, 1852, 1414, 1570, 2417, 721, 1429, 3852, 3023, 727, 1672, 3384, 3201, 2042, 1078, 339, 2462, 59, -1, -1, 768, 1654, 2171, 1210, 2396, 3378, 1408, 2867, 1759, 3711, 1477, 748, 3372, 2033, 1069, 330, 709, 40, 622, -1, 3939, 3342, -1, 3414, -1, 2513, 1390, 2231, 1270, 496, 3048, 162, 607, 2168, 1207, 1591, -1, 3918, 2864, 1753, 3705, 1471, 3357, -1, 3231, 634, 2030, 1066, 327, 3288, 34, 3207, 1993, 1014, 291, -1, 2507, 2687, 601, 1384, 3519, 1975, 977, 2351, -1, 3198, 2651, 3513, 1972, 971, 3120, 3897, 598, 2645, 3507, 1969, 965, -1, 3990, 595, 2639, 3498, 3078, 954, 264, 3252, 2342, 2630, 3339, 3054, 625, 3195, 706, 2333, 3465, 1948, 919, 249, 2273, -1, 2597, 1642, 574, 3045, -1, 3192, 2324, 3459, 1945, 913, 246, 739, 3189, 2591, 3435, 1933, 2960, 237, -1, 2318, 1924, 3174, 228, 3210, 4059, 1921, 354, 225, 1342, 3042, -1, 2300, 3402, 1333, 3336, 3153, 2294, 1441, 1330, 2267, 673, 3366, 3966, 3039, 3017, 1918, 3981, 222, 3360, 3014, 3035, 3864, -1, 3249, 3011, 3354, 2288, 2954, 1327, 3020, 664, 3057, 3345, 3606, 2054, 1090, 3960, 2486, 120, 2894, 1834, 3786, 1552, 1636, 3005, 2420, 2063, 1432, 357, 4092, 730, 2744, 3858, 733, 2048, 1084, 3942, 2474, 71, 1450, -1, 2087, 1111, 3243, -1, 2408, 2768, 1420, 3615, 2213, 1252, -1, 363, 129, 3564, 1843, 3795, 1561, 592, 77, -1, 1792, 3744, 1510, 3999, 589, 2435, 2144, 1912, 3936, 216, 2255, 2840, 1705, 3657, -1, 3240, 3552, 2546, 586, 450, 1321, 3204, 806, 1780, 3732, 1498, 3546, -1, 2918, 447, 3186, 351, 2489, 1774, 3726, 1492, 2993, 3183, 3540, -1, 2534, 444, 1435, 1180, 3180, 1768, 3720, 1486, 1702, 3654, 2528, 565, 1192, 3087, -1, -1, 556, 1726, 3678, 3051, 679, 553, 2522, -1, 3159, 432, -1, 830, 3032, 1744, 3696, 1462, 1029, 2072, 2429, 3029, 2702, 3156, 2753, -1, -1, 550, 3026, 2069, 3147, 2153, 2498, 421, 2750, 3138, 2849, 1723, 3675, -1, 3135, -1, -1, 2138, 1177, 414, 676, 826, 2834, 1693, 2135, 1174, 411, 3993, -1, 2831, 1687, 1861, 685, 795, 3132, -1, 2129, 1168, 408, -1, 789, 2825, 1675, -1, 2051, 1087, 3984, 2480, 2002, 1032, 300, 1858, 773, 2705, 2495, 2414, 691, 1426, -1, 4086, 724, 345, 2477, 74, 1453, 3258, 3972, 1696, 3648, 2249, 2411, 3417, 1423, 4044, 547, 3810, 3492, 798, 947, 261, 3273, -1, 2624, 3489, 1960, 944, 3885, 2912, 2327, 2621, -1, -1, 3447, 1939, 899, 3462, 3879, 916, 2579, 3441, 1936, 2594, 240, 3093, 2306, -1, 3327, 2321, 3873, 3429, 1930, 3807, 234, 1345, 3645, 2228, 1267, 493, 3117, 156, 3831, -1, 3987, 1339, 3639, 2225, 1264, 490, -1, 150, 3618, 893, 3849, 1585, -1, 132, 3600, 1846, 3798, 1564, 694, 114, 2891, 1828, 3780, 1546, -1, 884, 3588, -1, 688, 3333, -1, 102, 3828, 1816, 3768, 1534, 3576, 2005, 1038, 303, 3558, 89, 2711, 1804, 3756, 1522, 3570, 1786, 3738, 1504, 2570, 83, -1, 1798, 3750, 1516, -1, 3483, 1957, 937, 2558, 3264, 441, 2615, 2540, 405, 1762, 3714, 1480, 1666, 2552, 2132, 1171, 628, -1, 3324, 2828, 1681, 4089, 762, 438, -1, 3321, 2516, 1756, 3708, 1474, 782, 3801, 3102, -1, 4056, 435, -1, 3315, 3978, 1750, 3702, 1468, 3099, -1, 2510, 583, -1, 4050, -1, 3213, -1, -1, 580, 3975, 4026, -1, 2504, 2126, 1165, 4008, 3246, 571, 2822, 1669, 4002, 2162, 1201, -1, 568, -1, 2858, 1741, 3693, 765, 1198, 429, 2159, -1, 562, 1738, 3690, 2855, 1735, 3687, 3996, 3171, -1, 3060, -1, 842, 1195, 425, 839, 2156, -1, 1732, 3684, 1189, 2852, 1729, 3681, 3150, 1720, 3672, 3480, 836, 934, 255, 2150, 833, 2612, 3144, 823, 2846, 1717, 3669, 1186, 417, -1, -1, 2147, 1714, 3666, 2141, 820, 2843, 1711, 3663, 2837, 1699, 3651, 816, -1, 3891, -1, -1, 813, 2123, 1162, 802, 2117, 1156, 2819, 1663, -1, 2813, 1651, -1, 3477, 1954, 931, 2426, 3867, 758, 2609, -1, 745, 2111, 1150, 396, 3216, -1, 2807, 1639, 2060, 1096, 2099, 1138, 390, 2741, 3861, 2795, 1615, 736, 2093, 1132, 384, 1444, -1, 2789, 1603, 3168, 3855, 2066, -1, 360, -1, -1, 2747, 2465, 62, 2738, 2453, 49, 3318, -1, 1456, 2399, 3063, 1411, 2387, -1, 1399, -1, 15, 2723, 3471, 1951, 925, -1, -1, 2375, 2603, 1363, 3846, 24, 2729, 1894, 1891, 198, 195, 1876, 3843, 180, 1375, 3840, -1, -1, 2270, 2264, 1303, 1300, 2258, -1, 1285, 2105, 1144, 3312, 3837, -1, 2801, 1627, 3834, 2084, 1108, 3825, 2957, 2951, 2765, 1873, 2921, 177, 577, 2102, 1141, 2471, 68, 3822, 2798, 1621, 2252, -1, 1282, 2405, 3819, 1417, 1870, -1, 174, 3816, 1120, 375, 3804, -1, 2777, 3612, 3330, 2246, 2915, 1279, 126, 3594, 1840, 3792, 1558, -1, 108, 1123, 1822, 3774, 1540, 2780, 2120, 1159, -1, 2909, -1, 2816, 1657, 2114, 1153, 2075, 1099, -1, 2810, 1645, 2756, 4083, 752, -1, 2459, 56, 21, 2726, 4080, 742, -1, 3309, 2393, -1, 1405, 1369, -1, 4038, 2447, 43, 4053, -1, -1, 3165, 4032, 3534, 2381, 993, 1393, 2444, 670, 2666, -1, 3486, 4020, 940, 258, -1, 3255, 2618, 3300, 646, -1, 3474, -1, 928, 252, 1117, 3294, 2606, 1035, 2774, 655, 3963, 2708, 3636, 3951, 3261, 529, 526, 147, -1, 511, 3456, 1582, 909, -1, 3915, 3450, 2588, 902, 3444, 890, 896, 2582, 2315, 3090, 2576, 3927, -1, 2309, 3162, -1, 2303, 1909, 1903, 213, 207, -1, 1900, 508, 204, 1888, -1, 192, 3096, 1129, 1318, 1312, 1882, 2786, 186, 1309, -1, 4074, 1297, 3381, 505, -1, 3306, 2108, 1147, 1291, 2987, 2975, 2804, 1633, 3270, 2969, 3969, -1, 2945, 1017, -1, 2081, 1105, 2690, 3303, 2933, 2762, 2078, 1102, 9, -1, -1, 2759, 1011, 3, -1, 2369, 2684, 1357, 700, 3282, 2363, -1, 1351, 402, 1005, 649, 999, 1660, 2678, -1, 2672, 3114, 3528, 3522, 987, 980, 3285, 755, 2660, 2654, 1023, -1, -1, -1, 2696, -1, -1, -1, -1, -1, 3957, 3921, -1, -1, -1, -1, -1, 3126, -1, -1, -1, -1, -1, -1, 3945, -1, -1, -1, -1, -1, -1, -1, 631, -1, 3129, -1, -1, 3405, -1, -1, -1, -1, -1, -1, 4071, -1, -1, -1, -1, 3105, -1, 3399, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3279, 3393, -1, 3387, -1, 544, 538, -1, -1, -1, 535, 3375, 3369, 523, -1, -1, -1, 3411, -1, -1, 517, -1, -1, -1, -1, -1, 4068, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3123, -1, -1, -1, 619, -1, -1, -1, -1, -1, -1, 3291, -1, -1, -1, -1, -1, -1, 616, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 610, -1, 604, -1, -1, -1, -1, 3909, -1, -1, -1, -1, 3903, -1, -1, -1, 4062, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3111, -1, -1, -1, -1, -1, 3108, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4077, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4065, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4047, -1, -1, -1, -1, 4041, -1, -1, 4035 }; { int key = hash(codes); if (key <= MAX_HASH_VALUE) { int index = wordlist[key]; if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds1 + index, 1) == 0) return index; } } return -1; }