1 /**********************************************************************
2 utf8.c - Oniguruma (regular expression library)
3 **********************************************************************/
4 /*-
5 * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30 #include "regenc.h"
31
32 #define USE_INVALID_CODE_SCHEME
33
34 #ifdef USE_INVALID_CODE_SCHEME
35 /* virtual codepoint values for invalid encoding byte 0xfe and 0xff */
36 #define INVALID_CODE_FE 0xfffffffe
37 #define INVALID_CODE_FF 0xffffffff
38 #define VALID_CODE_LIMIT 0x7fffffff
39 #endif
40
41 #define utf8_islead(c) ((UChar )((c) & 0xc0) != 0x80)
42
43 static const int EncLen_UTF8[] = {
44 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
45 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
46 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
47 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
48 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
49 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
50 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
51 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
52 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
53 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
54 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
55 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
56 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
57 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
58 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
59 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1
60 };
61
62 static int
utf8_mbc_enc_len(const UChar * p)63 utf8_mbc_enc_len(const UChar* p)
64 {
65 return EncLen_UTF8[*p];
66 }
67
68 static int
utf8_is_mbc_newline(const UChar * p,const UChar * end)69 utf8_is_mbc_newline(const UChar* p, const UChar* end)
70 {
71 if (p < end) {
72 if (*p == 0x0a) return 1;
73
74 #ifdef USE_UNICODE_ALL_LINE_TERMINATORS
75 if (*p == 0x0d) return 1;
76 if (p + 1 < end) {
77 if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */
78 return 1;
79 if (p + 2 < end) {
80 if ((*(p+2) == 0xa8 || *(p+2) == 0xa9)
81 && *(p+1) == 0x80 && *p == 0xe2) /* U+2028, U+2029 */
82 return 1;
83 }
84 }
85 #endif
86 }
87
88 return 0;
89 }
90
91 static OnigCodePoint
utf8_mbc_to_code(const UChar * p,const UChar * end)92 utf8_mbc_to_code(const UChar* p, const UChar* end)
93 {
94 int c, len;
95 OnigCodePoint n;
96
97 len = enc_len(ONIG_ENCODING_UTF8, p);
98 c = *p++;
99 if (len > 1) {
100 len--;
101 n = c & ((1 << (6 - len)) - 1);
102 while (len--) {
103 c = *p++;
104 n = (n << 6) | (c & ((1 << 6) - 1));
105 }
106 return n;
107 }
108 else {
109 #ifdef USE_INVALID_CODE_SCHEME
110 if (c > 0xfd) {
111 return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
112 }
113 #endif
114 return (OnigCodePoint )c;
115 }
116 }
117
118 static int
utf8_code_to_mbclen(OnigCodePoint code)119 utf8_code_to_mbclen(OnigCodePoint code)
120 {
121 if ((code & 0xffffff80) == 0) return 1;
122 else if ((code & 0xfffff800) == 0) {
123 if (code <= 0xff && code >= 0xfe)
124 return 1;
125 return 2;
126 }
127 else if ((code & 0xffff0000) == 0) return 3;
128 else if ((code & 0xffe00000) == 0) return 4;
129 else if ((code & 0xfc000000) == 0) return 5;
130 else if ((code & 0x80000000) == 0) return 6;
131 #ifdef USE_INVALID_CODE_SCHEME
132 else if (code == INVALID_CODE_FE) return 1;
133 else if (code == INVALID_CODE_FF) return 1;
134 #endif
135 else
136 return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
137 }
138
139 #if 0
140 static int
141 utf8_code_to_mbc_first(OnigCodePoint code)
142 {
143 if ((code & 0xffffff80) == 0)
144 return code;
145 else {
146 if ((code & 0xfffff800) == 0)
147 return ((code>>6)& 0x1f) | 0xc0;
148 else if ((code & 0xffff0000) == 0)
149 return ((code>>12) & 0x0f) | 0xe0;
150 else if ((code & 0xffe00000) == 0)
151 return ((code>>18) & 0x07) | 0xf0;
152 else if ((code & 0xfc000000) == 0)
153 return ((code>>24) & 0x03) | 0xf8;
154 else if ((code & 0x80000000) == 0)
155 return ((code>>30) & 0x01) | 0xfc;
156 else {
157 return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
158 }
159 }
160 }
161 #endif
162
163 static int
utf8_code_to_mbc(OnigCodePoint code,UChar * buf)164 utf8_code_to_mbc(OnigCodePoint code, UChar *buf)
165 {
166 #define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80)
167 #define UTF8_TRAIL0(code) (UChar )(((code) & 0x3f) | 0x80)
168
169 if ((code & 0xffffff80) == 0) {
170 *buf = (UChar )code;
171 return 1;
172 }
173 else {
174 UChar *p = buf;
175
176 if ((code & 0xfffff800) == 0) {
177 *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0);
178 }
179 else if ((code & 0xffff0000) == 0) {
180 *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0);
181 *p++ = UTF8_TRAILS(code, 6);
182 }
183 else if ((code & 0xffe00000) == 0) {
184 *p++ = (UChar )(((code>>18) & 0x07) | 0xf0);
185 *p++ = UTF8_TRAILS(code, 12);
186 *p++ = UTF8_TRAILS(code, 6);
187 }
188 else if ((code & 0xfc000000) == 0) {
189 *p++ = (UChar )(((code>>24) & 0x03) | 0xf8);
190 *p++ = UTF8_TRAILS(code, 18);
191 *p++ = UTF8_TRAILS(code, 12);
192 *p++ = UTF8_TRAILS(code, 6);
193 }
194 else if ((code & 0x80000000) == 0) {
195 *p++ = (UChar )(((code>>30) & 0x01) | 0xfc);
196 *p++ = UTF8_TRAILS(code, 24);
197 *p++ = UTF8_TRAILS(code, 18);
198 *p++ = UTF8_TRAILS(code, 12);
199 *p++ = UTF8_TRAILS(code, 6);
200 }
201 #ifdef USE_INVALID_CODE_SCHEME
202 else if (code == INVALID_CODE_FE) {
203 *p = 0xfe;
204 return 1;
205 }
206 else if (code == INVALID_CODE_FF) {
207 *p = 0xff;
208 return 1;
209 }
210 #endif
211 else {
212 return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
213 }
214
215 *p++ = UTF8_TRAIL0(code);
216 return p - buf;
217 }
218 }
219
220 static int
utf8_mbc_to_normalize(OnigAmbigType flag,const UChar ** pp,const UChar * end,UChar * lower)221 utf8_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* lower)
222 {
223 const UChar* p = *pp;
224
225 if (ONIGENC_IS_MBC_ASCII(p)) {
226 if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
227 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
228 }
229 else {
230 *lower = *p;
231 }
232 (*pp)++;
233 return 1; /* return byte length of converted char to lower */
234 }
235 else {
236 int len;
237
238 if (*p == 195) { /* 195 == '\303' */
239 int c = *(p + 1);
240 if (c >= 128) {
241 if (c <= (UChar )'\236' && /* upper */
242 (flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
243 if (c != (UChar )'\227') {
244 *lower++ = *p;
245 *lower = (UChar )(c + 32);
246 (*pp) += 2;
247 return 2;
248 }
249 }
250 }
251 }
252
253 len = enc_len(ONIG_ENCODING_UTF8, p);
254 if (lower != p) {
255 int i;
256 for (i = 0; i < len; i++) {
257 *lower++ = *p++;
258 }
259 }
260 (*pp) += len;
261 return len; /* return byte length of converted char to lower */
262 }
263 }
264
265 static int
utf8_is_mbc_ambiguous(OnigAmbigType flag,const UChar ** pp,const UChar * end)266 utf8_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
267 {
268 const UChar* p = *pp;
269
270 if (ONIGENC_IS_MBC_ASCII(p)) {
271 (*pp)++;
272 if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
273 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
274 }
275 }
276 else {
277 (*pp) += enc_len(ONIG_ENCODING_UTF8, p);
278
279 if (*p == 195) { /* 195 == '\303' */
280 int c = *(p + 1);
281 if (c >= 128) {
282 if ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
283 if (c <= (UChar )'\236') { /* upper */
284 if (c == (UChar )'\227') return FALSE;
285 return TRUE;
286 }
287 else if (c >= (UChar )'\240' && c <= (UChar )'\276') { /* lower */
288 if (c == (UChar )'\267') return FALSE;
289 return TRUE;
290 }
291 }
292 }
293 }
294 }
295
296 return FALSE;
297 }
298
299
300 static const OnigCodePoint EmptyRange[] = { 0 };
301
302 static const OnigCodePoint SBAlnum[] = {
303 3,
304 0x0030, 0x0039,
305 0x0041, 0x005a,
306 0x0061, 0x007a
307 };
308
309 static const OnigCodePoint MBAlnum[] = {
310 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
311 411,
312 #else
313 6,
314 #endif
315 0x00aa, 0x00aa,
316 0x00b5, 0x00b5,
317 0x00ba, 0x00ba,
318 0x00c0, 0x00d6,
319 0x00d8, 0x00f6,
320 0x00f8, 0x0236
321 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
322 ,
323 0x0250, 0x02c1,
324 0x02c6, 0x02d1,
325 0x02e0, 0x02e4,
326 0x02ee, 0x02ee,
327 0x0300, 0x0357,
328 0x035d, 0x036f,
329 0x037a, 0x037a,
330 0x0386, 0x0386,
331 0x0388, 0x038a,
332 0x038c, 0x038c,
333 0x038e, 0x03a1,
334 0x03a3, 0x03ce,
335 0x03d0, 0x03f5,
336 0x03f7, 0x03fb,
337 0x0400, 0x0481,
338 0x0483, 0x0486,
339 0x0488, 0x04ce,
340 0x04d0, 0x04f5,
341 0x04f8, 0x04f9,
342 0x0500, 0x050f,
343 0x0531, 0x0556,
344 0x0559, 0x0559,
345 0x0561, 0x0587,
346 0x0591, 0x05a1,
347 0x05a3, 0x05b9,
348 0x05bb, 0x05bd,
349 0x05bf, 0x05bf,
350 0x05c1, 0x05c2,
351 0x05c4, 0x05c4,
352 0x05d0, 0x05ea,
353 0x05f0, 0x05f2,
354 0x0610, 0x0615,
355 0x0621, 0x063a,
356 0x0640, 0x0658,
357 0x0660, 0x0669,
358 0x066e, 0x06d3,
359 0x06d5, 0x06dc,
360 0x06de, 0x06e8,
361 0x06ea, 0x06fc,
362 0x06ff, 0x06ff,
363 0x0710, 0x074a,
364 0x074d, 0x074f,
365 0x0780, 0x07b1,
366 0x0901, 0x0939,
367 0x093c, 0x094d,
368 0x0950, 0x0954,
369 0x0958, 0x0963,
370 0x0966, 0x096f,
371 0x0981, 0x0983,
372 0x0985, 0x098c,
373 0x098f, 0x0990,
374 0x0993, 0x09a8,
375 0x09aa, 0x09b0,
376 0x09b2, 0x09b2,
377 0x09b6, 0x09b9,
378 0x09bc, 0x09c4,
379 0x09c7, 0x09c8,
380 0x09cb, 0x09cd,
381 0x09d7, 0x09d7,
382 0x09dc, 0x09dd,
383 0x09df, 0x09e3,
384 0x09e6, 0x09f1,
385 0x0a01, 0x0a03,
386 0x0a05, 0x0a0a,
387 0x0a0f, 0x0a10,
388 0x0a13, 0x0a28,
389 0x0a2a, 0x0a30,
390 0x0a32, 0x0a33,
391 0x0a35, 0x0a36,
392 0x0a38, 0x0a39,
393 0x0a3c, 0x0a3c,
394 0x0a3e, 0x0a42,
395 0x0a47, 0x0a48,
396 0x0a4b, 0x0a4d,
397 0x0a59, 0x0a5c,
398 0x0a5e, 0x0a5e,
399 0x0a66, 0x0a74,
400 0x0a81, 0x0a83,
401 0x0a85, 0x0a8d,
402 0x0a8f, 0x0a91,
403 0x0a93, 0x0aa8,
404 0x0aaa, 0x0ab0,
405 0x0ab2, 0x0ab3,
406 0x0ab5, 0x0ab9,
407 0x0abc, 0x0ac5,
408 0x0ac7, 0x0ac9,
409 0x0acb, 0x0acd,
410 0x0ad0, 0x0ad0,
411 0x0ae0, 0x0ae3,
412 0x0ae6, 0x0aef,
413 0x0b01, 0x0b03,
414 0x0b05, 0x0b0c,
415 0x0b0f, 0x0b10,
416 0x0b13, 0x0b28,
417 0x0b2a, 0x0b30,
418 0x0b32, 0x0b33,
419 0x0b35, 0x0b39,
420 0x0b3c, 0x0b43,
421 0x0b47, 0x0b48,
422 0x0b4b, 0x0b4d,
423 0x0b56, 0x0b57,
424 0x0b5c, 0x0b5d,
425 0x0b5f, 0x0b61,
426 0x0b66, 0x0b6f,
427 0x0b71, 0x0b71,
428 0x0b82, 0x0b83,
429 0x0b85, 0x0b8a,
430 0x0b8e, 0x0b90,
431 0x0b92, 0x0b95,
432 0x0b99, 0x0b9a,
433 0x0b9c, 0x0b9c,
434 0x0b9e, 0x0b9f,
435 0x0ba3, 0x0ba4,
436 0x0ba8, 0x0baa,
437 0x0bae, 0x0bb5,
438 0x0bb7, 0x0bb9,
439 0x0bbe, 0x0bc2,
440 0x0bc6, 0x0bc8,
441 0x0bca, 0x0bcd,
442 0x0bd7, 0x0bd7,
443 0x0be7, 0x0bef,
444 0x0c01, 0x0c03,
445 0x0c05, 0x0c0c,
446 0x0c0e, 0x0c10,
447 0x0c12, 0x0c28,
448 0x0c2a, 0x0c33,
449 0x0c35, 0x0c39,
450 0x0c3e, 0x0c44,
451 0x0c46, 0x0c48,
452 0x0c4a, 0x0c4d,
453 0x0c55, 0x0c56,
454 0x0c60, 0x0c61,
455 0x0c66, 0x0c6f,
456 0x0c82, 0x0c83,
457 0x0c85, 0x0c8c,
458 0x0c8e, 0x0c90,
459 0x0c92, 0x0ca8,
460 0x0caa, 0x0cb3,
461 0x0cb5, 0x0cb9,
462 0x0cbc, 0x0cc4,
463 0x0cc6, 0x0cc8,
464 0x0cca, 0x0ccd,
465 0x0cd5, 0x0cd6,
466 0x0cde, 0x0cde,
467 0x0ce0, 0x0ce1,
468 0x0ce6, 0x0cef,
469 0x0d02, 0x0d03,
470 0x0d05, 0x0d0c,
471 0x0d0e, 0x0d10,
472 0x0d12, 0x0d28,
473 0x0d2a, 0x0d39,
474 0x0d3e, 0x0d43,
475 0x0d46, 0x0d48,
476 0x0d4a, 0x0d4d,
477 0x0d57, 0x0d57,
478 0x0d60, 0x0d61,
479 0x0d66, 0x0d6f,
480 0x0d82, 0x0d83,
481 0x0d85, 0x0d96,
482 0x0d9a, 0x0db1,
483 0x0db3, 0x0dbb,
484 0x0dbd, 0x0dbd,
485 0x0dc0, 0x0dc6,
486 0x0dca, 0x0dca,
487 0x0dcf, 0x0dd4,
488 0x0dd6, 0x0dd6,
489 0x0dd8, 0x0ddf,
490 0x0df2, 0x0df3,
491 0x0e01, 0x0e3a,
492 0x0e40, 0x0e4e,
493 0x0e50, 0x0e59,
494 0x0e81, 0x0e82,
495 0x0e84, 0x0e84,
496 0x0e87, 0x0e88,
497 0x0e8a, 0x0e8a,
498 0x0e8d, 0x0e8d,
499 0x0e94, 0x0e97,
500 0x0e99, 0x0e9f,
501 0x0ea1, 0x0ea3,
502 0x0ea5, 0x0ea5,
503 0x0ea7, 0x0ea7,
504 0x0eaa, 0x0eab,
505 0x0ead, 0x0eb9,
506 0x0ebb, 0x0ebd,
507 0x0ec0, 0x0ec4,
508 0x0ec6, 0x0ec6,
509 0x0ec8, 0x0ecd,
510 0x0ed0, 0x0ed9,
511 0x0edc, 0x0edd,
512 0x0f00, 0x0f00,
513 0x0f18, 0x0f19,
514 0x0f20, 0x0f29,
515 0x0f35, 0x0f35,
516 0x0f37, 0x0f37,
517 0x0f39, 0x0f39,
518 0x0f3e, 0x0f47,
519 0x0f49, 0x0f6a,
520 0x0f71, 0x0f84,
521 0x0f86, 0x0f8b,
522 0x0f90, 0x0f97,
523 0x0f99, 0x0fbc,
524 0x0fc6, 0x0fc6,
525 0x1000, 0x1021,
526 0x1023, 0x1027,
527 0x1029, 0x102a,
528 0x102c, 0x1032,
529 0x1036, 0x1039,
530 0x1040, 0x1049,
531 0x1050, 0x1059,
532 0x10a0, 0x10c5,
533 0x10d0, 0x10f8,
534 0x1100, 0x1159,
535 0x115f, 0x11a2,
536 0x11a8, 0x11f9,
537 0x1200, 0x1206,
538 0x1208, 0x1246,
539 0x1248, 0x1248,
540 0x124a, 0x124d,
541 0x1250, 0x1256,
542 0x1258, 0x1258,
543 0x125a, 0x125d,
544 0x1260, 0x1286,
545 0x1288, 0x1288,
546 0x128a, 0x128d,
547 0x1290, 0x12ae,
548 0x12b0, 0x12b0,
549 0x12b2, 0x12b5,
550 0x12b8, 0x12be,
551 0x12c0, 0x12c0,
552 0x12c2, 0x12c5,
553 0x12c8, 0x12ce,
554 0x12d0, 0x12d6,
555 0x12d8, 0x12ee,
556 0x12f0, 0x130e,
557 0x1310, 0x1310,
558 0x1312, 0x1315,
559 0x1318, 0x131e,
560 0x1320, 0x1346,
561 0x1348, 0x135a,
562 0x1369, 0x1371,
563 0x13a0, 0x13f4,
564 0x1401, 0x166c,
565 0x166f, 0x1676,
566 0x1681, 0x169a,
567 0x16a0, 0x16ea,
568 0x1700, 0x170c,
569 0x170e, 0x1714,
570 0x1720, 0x1734,
571 0x1740, 0x1753,
572 0x1760, 0x176c,
573 0x176e, 0x1770,
574 0x1772, 0x1773,
575 0x1780, 0x17b3,
576 0x17b6, 0x17d3,
577 0x17d7, 0x17d7,
578 0x17dc, 0x17dd,
579 0x17e0, 0x17e9,
580 0x180b, 0x180d,
581 0x1810, 0x1819,
582 0x1820, 0x1877,
583 0x1880, 0x18a9,
584 0x1900, 0x191c,
585 0x1920, 0x192b,
586 0x1930, 0x193b,
587 0x1946, 0x196d,
588 0x1970, 0x1974,
589 0x1d00, 0x1d6b,
590 0x1e00, 0x1e9b,
591 0x1ea0, 0x1ef9,
592 0x1f00, 0x1f15,
593 0x1f18, 0x1f1d,
594 0x1f20, 0x1f45,
595 0x1f48, 0x1f4d,
596 0x1f50, 0x1f57,
597 0x1f59, 0x1f59,
598 0x1f5b, 0x1f5b,
599 0x1f5d, 0x1f5d,
600 0x1f5f, 0x1f7d,
601 0x1f80, 0x1fb4,
602 0x1fb6, 0x1fbc,
603 0x1fbe, 0x1fbe,
604 0x1fc2, 0x1fc4,
605 0x1fc6, 0x1fcc,
606 0x1fd0, 0x1fd3,
607 0x1fd6, 0x1fdb,
608 0x1fe0, 0x1fec,
609 0x1ff2, 0x1ff4,
610 0x1ff6, 0x1ffc,
611 0x2071, 0x2071,
612 0x207f, 0x207f,
613 0x20d0, 0x20ea,
614 0x2102, 0x2102,
615 0x2107, 0x2107,
616 0x210a, 0x2113,
617 0x2115, 0x2115,
618 0x2119, 0x211d,
619 0x2124, 0x2124,
620 0x2126, 0x2126,
621 0x2128, 0x2128,
622 0x212a, 0x212d,
623 0x212f, 0x2131,
624 0x2133, 0x2139,
625 0x213d, 0x213f,
626 0x2145, 0x2149,
627 0x3005, 0x3006,
628 0x302a, 0x302f,
629 0x3031, 0x3035,
630 0x303b, 0x303c,
631 0x3041, 0x3096,
632 0x3099, 0x309a,
633 0x309d, 0x309f,
634 0x30a1, 0x30fa,
635 0x30fc, 0x30ff,
636 0x3105, 0x312c,
637 0x3131, 0x318e,
638 0x31a0, 0x31b7,
639 0x31f0, 0x31ff,
640 0x3400, 0x4db5,
641 0x4e00, 0x9fa5,
642 0xa000, 0xa48c,
643 0xac00, 0xd7a3,
644 0xf900, 0xfa2d,
645 0xfa30, 0xfa6a,
646 0xfb00, 0xfb06,
647 0xfb13, 0xfb17,
648 0xfb1d, 0xfb28,
649 0xfb2a, 0xfb36,
650 0xfb38, 0xfb3c,
651 0xfb3e, 0xfb3e,
652 0xfb40, 0xfb41,
653 0xfb43, 0xfb44,
654 0xfb46, 0xfbb1,
655 0xfbd3, 0xfd3d,
656 0xfd50, 0xfd8f,
657 0xfd92, 0xfdc7,
658 0xfdf0, 0xfdfb,
659 0xfe00, 0xfe0f,
660 0xfe20, 0xfe23,
661 0xfe70, 0xfe74,
662 0xfe76, 0xfefc,
663 0xff10, 0xff19,
664 0xff21, 0xff3a,
665 0xff41, 0xff5a,
666 0xff66, 0xffbe,
667 0xffc2, 0xffc7,
668 0xffca, 0xffcf,
669 0xffd2, 0xffd7,
670 0xffda, 0xffdc,
671 0x10000, 0x1000b,
672 0x1000d, 0x10026,
673 0x10028, 0x1003a,
674 0x1003c, 0x1003d,
675 0x1003f, 0x1004d,
676 0x10050, 0x1005d,
677 0x10080, 0x100fa,
678 0x10300, 0x1031e,
679 0x10330, 0x10349,
680 0x10380, 0x1039d,
681 0x10400, 0x1049d,
682 0x104a0, 0x104a9,
683 0x10800, 0x10805,
684 0x10808, 0x10808,
685 0x1080a, 0x10835,
686 0x10837, 0x10838,
687 0x1083c, 0x1083c,
688 0x1083f, 0x1083f,
689 0x1d165, 0x1d169,
690 0x1d16d, 0x1d172,
691 0x1d17b, 0x1d182,
692 0x1d185, 0x1d18b,
693 0x1d1aa, 0x1d1ad,
694 0x1d400, 0x1d454,
695 0x1d456, 0x1d49c,
696 0x1d49e, 0x1d49f,
697 0x1d4a2, 0x1d4a2,
698 0x1d4a5, 0x1d4a6,
699 0x1d4a9, 0x1d4ac,
700 0x1d4ae, 0x1d4b9,
701 0x1d4bb, 0x1d4bb,
702 0x1d4bd, 0x1d4c3,
703 0x1d4c5, 0x1d505,
704 0x1d507, 0x1d50a,
705 0x1d50d, 0x1d514,
706 0x1d516, 0x1d51c,
707 0x1d51e, 0x1d539,
708 0x1d53b, 0x1d53e,
709 0x1d540, 0x1d544,
710 0x1d546, 0x1d546,
711 0x1d54a, 0x1d550,
712 0x1d552, 0x1d6a3,
713 0x1d6a8, 0x1d6c0,
714 0x1d6c2, 0x1d6da,
715 0x1d6dc, 0x1d6fa,
716 0x1d6fc, 0x1d714,
717 0x1d716, 0x1d734,
718 0x1d736, 0x1d74e,
719 0x1d750, 0x1d76e,
720 0x1d770, 0x1d788,
721 0x1d78a, 0x1d7a8,
722 0x1d7aa, 0x1d7c2,
723 0x1d7c4, 0x1d7c9,
724 0x1d7ce, 0x1d7ff,
725 0x20000, 0x2a6d6,
726 0x2f800, 0x2fa1d,
727 0xe0100, 0xe01ef
728 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
729 }; /* end of MBAlnum */
730
731 static const OnigCodePoint SBAlpha[] = {
732 2,
733 0x0041, 0x005a,
734 0x0061, 0x007a
735 };
736
737 static const OnigCodePoint MBAlpha[] = {
738 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
739 394,
740 #else
741 6,
742 #endif
743 0x00aa, 0x00aa,
744 0x00b5, 0x00b5,
745 0x00ba, 0x00ba,
746 0x00c0, 0x00d6,
747 0x00d8, 0x00f6,
748 0x00f8, 0x0236
749 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
750 ,
751 0x0250, 0x02c1,
752 0x02c6, 0x02d1,
753 0x02e0, 0x02e4,
754 0x02ee, 0x02ee,
755 0x0300, 0x0357,
756 0x035d, 0x036f,
757 0x037a, 0x037a,
758 0x0386, 0x0386,
759 0x0388, 0x038a,
760 0x038c, 0x038c,
761 0x038e, 0x03a1,
762 0x03a3, 0x03ce,
763 0x03d0, 0x03f5,
764 0x03f7, 0x03fb,
765 0x0400, 0x0481,
766 0x0483, 0x0486,
767 0x0488, 0x04ce,
768 0x04d0, 0x04f5,
769 0x04f8, 0x04f9,
770 0x0500, 0x050f,
771 0x0531, 0x0556,
772 0x0559, 0x0559,
773 0x0561, 0x0587,
774 0x0591, 0x05a1,
775 0x05a3, 0x05b9,
776 0x05bb, 0x05bd,
777 0x05bf, 0x05bf,
778 0x05c1, 0x05c2,
779 0x05c4, 0x05c4,
780 0x05d0, 0x05ea,
781 0x05f0, 0x05f2,
782 0x0610, 0x0615,
783 0x0621, 0x063a,
784 0x0640, 0x0658,
785 0x066e, 0x06d3,
786 0x06d5, 0x06dc,
787 0x06de, 0x06e8,
788 0x06ea, 0x06ef,
789 0x06fa, 0x06fc,
790 0x06ff, 0x06ff,
791 0x0710, 0x074a,
792 0x074d, 0x074f,
793 0x0780, 0x07b1,
794 0x0901, 0x0939,
795 0x093c, 0x094d,
796 0x0950, 0x0954,
797 0x0958, 0x0963,
798 0x0981, 0x0983,
799 0x0985, 0x098c,
800 0x098f, 0x0990,
801 0x0993, 0x09a8,
802 0x09aa, 0x09b0,
803 0x09b2, 0x09b2,
804 0x09b6, 0x09b9,
805 0x09bc, 0x09c4,
806 0x09c7, 0x09c8,
807 0x09cb, 0x09cd,
808 0x09d7, 0x09d7,
809 0x09dc, 0x09dd,
810 0x09df, 0x09e3,
811 0x09f0, 0x09f1,
812 0x0a01, 0x0a03,
813 0x0a05, 0x0a0a,
814 0x0a0f, 0x0a10,
815 0x0a13, 0x0a28,
816 0x0a2a, 0x0a30,
817 0x0a32, 0x0a33,
818 0x0a35, 0x0a36,
819 0x0a38, 0x0a39,
820 0x0a3c, 0x0a3c,
821 0x0a3e, 0x0a42,
822 0x0a47, 0x0a48,
823 0x0a4b, 0x0a4d,
824 0x0a59, 0x0a5c,
825 0x0a5e, 0x0a5e,
826 0x0a70, 0x0a74,
827 0x0a81, 0x0a83,
828 0x0a85, 0x0a8d,
829 0x0a8f, 0x0a91,
830 0x0a93, 0x0aa8,
831 0x0aaa, 0x0ab0,
832 0x0ab2, 0x0ab3,
833 0x0ab5, 0x0ab9,
834 0x0abc, 0x0ac5,
835 0x0ac7, 0x0ac9,
836 0x0acb, 0x0acd,
837 0x0ad0, 0x0ad0,
838 0x0ae0, 0x0ae3,
839 0x0b01, 0x0b03,
840 0x0b05, 0x0b0c,
841 0x0b0f, 0x0b10,
842 0x0b13, 0x0b28,
843 0x0b2a, 0x0b30,
844 0x0b32, 0x0b33,
845 0x0b35, 0x0b39,
846 0x0b3c, 0x0b43,
847 0x0b47, 0x0b48,
848 0x0b4b, 0x0b4d,
849 0x0b56, 0x0b57,
850 0x0b5c, 0x0b5d,
851 0x0b5f, 0x0b61,
852 0x0b71, 0x0b71,
853 0x0b82, 0x0b83,
854 0x0b85, 0x0b8a,
855 0x0b8e, 0x0b90,
856 0x0b92, 0x0b95,
857 0x0b99, 0x0b9a,
858 0x0b9c, 0x0b9c,
859 0x0b9e, 0x0b9f,
860 0x0ba3, 0x0ba4,
861 0x0ba8, 0x0baa,
862 0x0bae, 0x0bb5,
863 0x0bb7, 0x0bb9,
864 0x0bbe, 0x0bc2,
865 0x0bc6, 0x0bc8,
866 0x0bca, 0x0bcd,
867 0x0bd7, 0x0bd7,
868 0x0c01, 0x0c03,
869 0x0c05, 0x0c0c,
870 0x0c0e, 0x0c10,
871 0x0c12, 0x0c28,
872 0x0c2a, 0x0c33,
873 0x0c35, 0x0c39,
874 0x0c3e, 0x0c44,
875 0x0c46, 0x0c48,
876 0x0c4a, 0x0c4d,
877 0x0c55, 0x0c56,
878 0x0c60, 0x0c61,
879 0x0c82, 0x0c83,
880 0x0c85, 0x0c8c,
881 0x0c8e, 0x0c90,
882 0x0c92, 0x0ca8,
883 0x0caa, 0x0cb3,
884 0x0cb5, 0x0cb9,
885 0x0cbc, 0x0cc4,
886 0x0cc6, 0x0cc8,
887 0x0cca, 0x0ccd,
888 0x0cd5, 0x0cd6,
889 0x0cde, 0x0cde,
890 0x0ce0, 0x0ce1,
891 0x0d02, 0x0d03,
892 0x0d05, 0x0d0c,
893 0x0d0e, 0x0d10,
894 0x0d12, 0x0d28,
895 0x0d2a, 0x0d39,
896 0x0d3e, 0x0d43,
897 0x0d46, 0x0d48,
898 0x0d4a, 0x0d4d,
899 0x0d57, 0x0d57,
900 0x0d60, 0x0d61,
901 0x0d82, 0x0d83,
902 0x0d85, 0x0d96,
903 0x0d9a, 0x0db1,
904 0x0db3, 0x0dbb,
905 0x0dbd, 0x0dbd,
906 0x0dc0, 0x0dc6,
907 0x0dca, 0x0dca,
908 0x0dcf, 0x0dd4,
909 0x0dd6, 0x0dd6,
910 0x0dd8, 0x0ddf,
911 0x0df2, 0x0df3,
912 0x0e01, 0x0e3a,
913 0x0e40, 0x0e4e,
914 0x0e81, 0x0e82,
915 0x0e84, 0x0e84,
916 0x0e87, 0x0e88,
917 0x0e8a, 0x0e8a,
918 0x0e8d, 0x0e8d,
919 0x0e94, 0x0e97,
920 0x0e99, 0x0e9f,
921 0x0ea1, 0x0ea3,
922 0x0ea5, 0x0ea5,
923 0x0ea7, 0x0ea7,
924 0x0eaa, 0x0eab,
925 0x0ead, 0x0eb9,
926 0x0ebb, 0x0ebd,
927 0x0ec0, 0x0ec4,
928 0x0ec6, 0x0ec6,
929 0x0ec8, 0x0ecd,
930 0x0edc, 0x0edd,
931 0x0f00, 0x0f00,
932 0x0f18, 0x0f19,
933 0x0f35, 0x0f35,
934 0x0f37, 0x0f37,
935 0x0f39, 0x0f39,
936 0x0f3e, 0x0f47,
937 0x0f49, 0x0f6a,
938 0x0f71, 0x0f84,
939 0x0f86, 0x0f8b,
940 0x0f90, 0x0f97,
941 0x0f99, 0x0fbc,
942 0x0fc6, 0x0fc6,
943 0x1000, 0x1021,
944 0x1023, 0x1027,
945 0x1029, 0x102a,
946 0x102c, 0x1032,
947 0x1036, 0x1039,
948 0x1050, 0x1059,
949 0x10a0, 0x10c5,
950 0x10d0, 0x10f8,
951 0x1100, 0x1159,
952 0x115f, 0x11a2,
953 0x11a8, 0x11f9,
954 0x1200, 0x1206,
955 0x1208, 0x1246,
956 0x1248, 0x1248,
957 0x124a, 0x124d,
958 0x1250, 0x1256,
959 0x1258, 0x1258,
960 0x125a, 0x125d,
961 0x1260, 0x1286,
962 0x1288, 0x1288,
963 0x128a, 0x128d,
964 0x1290, 0x12ae,
965 0x12b0, 0x12b0,
966 0x12b2, 0x12b5,
967 0x12b8, 0x12be,
968 0x12c0, 0x12c0,
969 0x12c2, 0x12c5,
970 0x12c8, 0x12ce,
971 0x12d0, 0x12d6,
972 0x12d8, 0x12ee,
973 0x12f0, 0x130e,
974 0x1310, 0x1310,
975 0x1312, 0x1315,
976 0x1318, 0x131e,
977 0x1320, 0x1346,
978 0x1348, 0x135a,
979 0x13a0, 0x13f4,
980 0x1401, 0x166c,
981 0x166f, 0x1676,
982 0x1681, 0x169a,
983 0x16a0, 0x16ea,
984 0x1700, 0x170c,
985 0x170e, 0x1714,
986 0x1720, 0x1734,
987 0x1740, 0x1753,
988 0x1760, 0x176c,
989 0x176e, 0x1770,
990 0x1772, 0x1773,
991 0x1780, 0x17b3,
992 0x17b6, 0x17d3,
993 0x17d7, 0x17d7,
994 0x17dc, 0x17dd,
995 0x180b, 0x180d,
996 0x1820, 0x1877,
997 0x1880, 0x18a9,
998 0x1900, 0x191c,
999 0x1920, 0x192b,
1000 0x1930, 0x193b,
1001 0x1950, 0x196d,
1002 0x1970, 0x1974,
1003 0x1d00, 0x1d6b,
1004 0x1e00, 0x1e9b,
1005 0x1ea0, 0x1ef9,
1006 0x1f00, 0x1f15,
1007 0x1f18, 0x1f1d,
1008 0x1f20, 0x1f45,
1009 0x1f48, 0x1f4d,
1010 0x1f50, 0x1f57,
1011 0x1f59, 0x1f59,
1012 0x1f5b, 0x1f5b,
1013 0x1f5d, 0x1f5d,
1014 0x1f5f, 0x1f7d,
1015 0x1f80, 0x1fb4,
1016 0x1fb6, 0x1fbc,
1017 0x1fbe, 0x1fbe,
1018 0x1fc2, 0x1fc4,
1019 0x1fc6, 0x1fcc,
1020 0x1fd0, 0x1fd3,
1021 0x1fd6, 0x1fdb,
1022 0x1fe0, 0x1fec,
1023 0x1ff2, 0x1ff4,
1024 0x1ff6, 0x1ffc,
1025 0x2071, 0x2071,
1026 0x207f, 0x207f,
1027 0x20d0, 0x20ea,
1028 0x2102, 0x2102,
1029 0x2107, 0x2107,
1030 0x210a, 0x2113,
1031 0x2115, 0x2115,
1032 0x2119, 0x211d,
1033 0x2124, 0x2124,
1034 0x2126, 0x2126,
1035 0x2128, 0x2128,
1036 0x212a, 0x212d,
1037 0x212f, 0x2131,
1038 0x2133, 0x2139,
1039 0x213d, 0x213f,
1040 0x2145, 0x2149,
1041 0x3005, 0x3006,
1042 0x302a, 0x302f,
1043 0x3031, 0x3035,
1044 0x303b, 0x303c,
1045 0x3041, 0x3096,
1046 0x3099, 0x309a,
1047 0x309d, 0x309f,
1048 0x30a1, 0x30fa,
1049 0x30fc, 0x30ff,
1050 0x3105, 0x312c,
1051 0x3131, 0x318e,
1052 0x31a0, 0x31b7,
1053 0x31f0, 0x31ff,
1054 0x3400, 0x4db5,
1055 0x4e00, 0x9fa5,
1056 0xa000, 0xa48c,
1057 0xac00, 0xd7a3,
1058 0xf900, 0xfa2d,
1059 0xfa30, 0xfa6a,
1060 0xfb00, 0xfb06,
1061 0xfb13, 0xfb17,
1062 0xfb1d, 0xfb28,
1063 0xfb2a, 0xfb36,
1064 0xfb38, 0xfb3c,
1065 0xfb3e, 0xfb3e,
1066 0xfb40, 0xfb41,
1067 0xfb43, 0xfb44,
1068 0xfb46, 0xfbb1,
1069 0xfbd3, 0xfd3d,
1070 0xfd50, 0xfd8f,
1071 0xfd92, 0xfdc7,
1072 0xfdf0, 0xfdfb,
1073 0xfe00, 0xfe0f,
1074 0xfe20, 0xfe23,
1075 0xfe70, 0xfe74,
1076 0xfe76, 0xfefc,
1077 0xff21, 0xff3a,
1078 0xff41, 0xff5a,
1079 0xff66, 0xffbe,
1080 0xffc2, 0xffc7,
1081 0xffca, 0xffcf,
1082 0xffd2, 0xffd7,
1083 0xffda, 0xffdc,
1084 0x10000, 0x1000b,
1085 0x1000d, 0x10026,
1086 0x10028, 0x1003a,
1087 0x1003c, 0x1003d,
1088 0x1003f, 0x1004d,
1089 0x10050, 0x1005d,
1090 0x10080, 0x100fa,
1091 0x10300, 0x1031e,
1092 0x10330, 0x10349,
1093 0x10380, 0x1039d,
1094 0x10400, 0x1049d,
1095 0x10800, 0x10805,
1096 0x10808, 0x10808,
1097 0x1080a, 0x10835,
1098 0x10837, 0x10838,
1099 0x1083c, 0x1083c,
1100 0x1083f, 0x1083f,
1101 0x1d165, 0x1d169,
1102 0x1d16d, 0x1d172,
1103 0x1d17b, 0x1d182,
1104 0x1d185, 0x1d18b,
1105 0x1d1aa, 0x1d1ad,
1106 0x1d400, 0x1d454,
1107 0x1d456, 0x1d49c,
1108 0x1d49e, 0x1d49f,
1109 0x1d4a2, 0x1d4a2,
1110 0x1d4a5, 0x1d4a6,
1111 0x1d4a9, 0x1d4ac,
1112 0x1d4ae, 0x1d4b9,
1113 0x1d4bb, 0x1d4bb,
1114 0x1d4bd, 0x1d4c3,
1115 0x1d4c5, 0x1d505,
1116 0x1d507, 0x1d50a,
1117 0x1d50d, 0x1d514,
1118 0x1d516, 0x1d51c,
1119 0x1d51e, 0x1d539,
1120 0x1d53b, 0x1d53e,
1121 0x1d540, 0x1d544,
1122 0x1d546, 0x1d546,
1123 0x1d54a, 0x1d550,
1124 0x1d552, 0x1d6a3,
1125 0x1d6a8, 0x1d6c0,
1126 0x1d6c2, 0x1d6da,
1127 0x1d6dc, 0x1d6fa,
1128 0x1d6fc, 0x1d714,
1129 0x1d716, 0x1d734,
1130 0x1d736, 0x1d74e,
1131 0x1d750, 0x1d76e,
1132 0x1d770, 0x1d788,
1133 0x1d78a, 0x1d7a8,
1134 0x1d7aa, 0x1d7c2,
1135 0x1d7c4, 0x1d7c9,
1136 0x20000, 0x2a6d6,
1137 0x2f800, 0x2fa1d,
1138 0xe0100, 0xe01ef
1139 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
1140 }; /* end of MBAlpha */
1141
1142 static const OnigCodePoint SBBlank[] = {
1143 2,
1144 0x0009, 0x0009,
1145 0x0020, 0x0020
1146 };
1147
1148 static const OnigCodePoint MBBlank[] = {
1149 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1150 7,
1151 #else
1152 1,
1153 #endif
1154 0x00a0, 0x00a0
1155 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1156 ,
1157 0x1680, 0x1680,
1158 0x180e, 0x180e,
1159 0x2000, 0x200a,
1160 0x202f, 0x202f,
1161 0x205f, 0x205f,
1162 0x3000, 0x3000
1163 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
1164 }; /* end of MBBlank */
1165
1166 static const OnigCodePoint SBCntrl[] = {
1167 2,
1168 0x0000, 0x001f,
1169 0x007f, 0x007f
1170 };
1171
1172 static const OnigCodePoint MBCntrl[] = {
1173 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1174 18,
1175 #else
1176 2,
1177 #endif
1178 0x0080, 0x009f,
1179 0x00ad, 0x00ad
1180 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1181 ,
1182 0x0600, 0x0603,
1183 0x06dd, 0x06dd,
1184 0x070f, 0x070f,
1185 0x17b4, 0x17b5,
1186 0x200b, 0x200f,
1187 0x202a, 0x202e,
1188 0x2060, 0x2063,
1189 0x206a, 0x206f,
1190 0xd800, 0xf8ff,
1191 0xfeff, 0xfeff,
1192 0xfff9, 0xfffb,
1193 0x1d173, 0x1d17a,
1194 0xe0001, 0xe0001,
1195 0xe0020, 0xe007f,
1196 0xf0000, 0xffffd,
1197 0x100000, 0x10fffd
1198 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
1199 }; /* end of MBCntrl */
1200
1201 static const OnigCodePoint SBDigit[] = {
1202 1,
1203 0x0030, 0x0039
1204 };
1205
1206 static const OnigCodePoint MBDigit[] = {
1207 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1208 22,
1209 #else
1210 0
1211 #endif
1212 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1213 0x0660, 0x0669,
1214 0x06f0, 0x06f9,
1215 0x0966, 0x096f,
1216 0x09e6, 0x09ef,
1217 0x0a66, 0x0a6f,
1218 0x0ae6, 0x0aef,
1219 0x0b66, 0x0b6f,
1220 0x0be7, 0x0bef,
1221 0x0c66, 0x0c6f,
1222 0x0ce6, 0x0cef,
1223 0x0d66, 0x0d6f,
1224 0x0e50, 0x0e59,
1225 0x0ed0, 0x0ed9,
1226 0x0f20, 0x0f29,
1227 0x1040, 0x1049,
1228 0x1369, 0x1371,
1229 0x17e0, 0x17e9,
1230 0x1810, 0x1819,
1231 0x1946, 0x194f,
1232 0xff10, 0xff19,
1233 0x104a0, 0x104a9,
1234 0x1d7ce, 0x1d7ff
1235 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
1236 }; /* end of MBDigit */
1237
1238 static const OnigCodePoint SBGraph[] = {
1239 1,
1240 0x0021, 0x007e
1241 };
1242
1243 static const OnigCodePoint MBGraph[] = {
1244 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1245 404,
1246 #else
1247 1,
1248 #endif
1249 0x00a1, 0x0236
1250 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1251 ,
1252 0x0250, 0x0357,
1253 0x035d, 0x036f,
1254 0x0374, 0x0375,
1255 0x037a, 0x037a,
1256 0x037e, 0x037e,
1257 0x0384, 0x038a,
1258 0x038c, 0x038c,
1259 0x038e, 0x03a1,
1260 0x03a3, 0x03ce,
1261 0x03d0, 0x03fb,
1262 0x0400, 0x0486,
1263 0x0488, 0x04ce,
1264 0x04d0, 0x04f5,
1265 0x04f8, 0x04f9,
1266 0x0500, 0x050f,
1267 0x0531, 0x0556,
1268 0x0559, 0x055f,
1269 0x0561, 0x0587,
1270 0x0589, 0x058a,
1271 0x0591, 0x05a1,
1272 0x05a3, 0x05b9,
1273 0x05bb, 0x05c4,
1274 0x05d0, 0x05ea,
1275 0x05f0, 0x05f4,
1276 0x0600, 0x0603,
1277 0x060c, 0x0615,
1278 0x061b, 0x061b,
1279 0x061f, 0x061f,
1280 0x0621, 0x063a,
1281 0x0640, 0x0658,
1282 0x0660, 0x070d,
1283 0x070f, 0x074a,
1284 0x074d, 0x074f,
1285 0x0780, 0x07b1,
1286 0x0901, 0x0939,
1287 0x093c, 0x094d,
1288 0x0950, 0x0954,
1289 0x0958, 0x0970,
1290 0x0981, 0x0983,
1291 0x0985, 0x098c,
1292 0x098f, 0x0990,
1293 0x0993, 0x09a8,
1294 0x09aa, 0x09b0,
1295 0x09b2, 0x09b2,
1296 0x09b6, 0x09b9,
1297 0x09bc, 0x09c4,
1298 0x09c7, 0x09c8,
1299 0x09cb, 0x09cd,
1300 0x09d7, 0x09d7,
1301 0x09dc, 0x09dd,
1302 0x09df, 0x09e3,
1303 0x09e6, 0x09fa,
1304 0x0a01, 0x0a03,
1305 0x0a05, 0x0a0a,
1306 0x0a0f, 0x0a10,
1307 0x0a13, 0x0a28,
1308 0x0a2a, 0x0a30,
1309 0x0a32, 0x0a33,
1310 0x0a35, 0x0a36,
1311 0x0a38, 0x0a39,
1312 0x0a3c, 0x0a3c,
1313 0x0a3e, 0x0a42,
1314 0x0a47, 0x0a48,
1315 0x0a4b, 0x0a4d,
1316 0x0a59, 0x0a5c,
1317 0x0a5e, 0x0a5e,
1318 0x0a66, 0x0a74,
1319 0x0a81, 0x0a83,
1320 0x0a85, 0x0a8d,
1321 0x0a8f, 0x0a91,
1322 0x0a93, 0x0aa8,
1323 0x0aaa, 0x0ab0,
1324 0x0ab2, 0x0ab3,
1325 0x0ab5, 0x0ab9,
1326 0x0abc, 0x0ac5,
1327 0x0ac7, 0x0ac9,
1328 0x0acb, 0x0acd,
1329 0x0ad0, 0x0ad0,
1330 0x0ae0, 0x0ae3,
1331 0x0ae6, 0x0aef,
1332 0x0af1, 0x0af1,
1333 0x0b01, 0x0b03,
1334 0x0b05, 0x0b0c,
1335 0x0b0f, 0x0b10,
1336 0x0b13, 0x0b28,
1337 0x0b2a, 0x0b30,
1338 0x0b32, 0x0b33,
1339 0x0b35, 0x0b39,
1340 0x0b3c, 0x0b43,
1341 0x0b47, 0x0b48,
1342 0x0b4b, 0x0b4d,
1343 0x0b56, 0x0b57,
1344 0x0b5c, 0x0b5d,
1345 0x0b5f, 0x0b61,
1346 0x0b66, 0x0b71,
1347 0x0b82, 0x0b83,
1348 0x0b85, 0x0b8a,
1349 0x0b8e, 0x0b90,
1350 0x0b92, 0x0b95,
1351 0x0b99, 0x0b9a,
1352 0x0b9c, 0x0b9c,
1353 0x0b9e, 0x0b9f,
1354 0x0ba3, 0x0ba4,
1355 0x0ba8, 0x0baa,
1356 0x0bae, 0x0bb5,
1357 0x0bb7, 0x0bb9,
1358 0x0bbe, 0x0bc2,
1359 0x0bc6, 0x0bc8,
1360 0x0bca, 0x0bcd,
1361 0x0bd7, 0x0bd7,
1362 0x0be7, 0x0bfa,
1363 0x0c01, 0x0c03,
1364 0x0c05, 0x0c0c,
1365 0x0c0e, 0x0c10,
1366 0x0c12, 0x0c28,
1367 0x0c2a, 0x0c33,
1368 0x0c35, 0x0c39,
1369 0x0c3e, 0x0c44,
1370 0x0c46, 0x0c48,
1371 0x0c4a, 0x0c4d,
1372 0x0c55, 0x0c56,
1373 0x0c60, 0x0c61,
1374 0x0c66, 0x0c6f,
1375 0x0c82, 0x0c83,
1376 0x0c85, 0x0c8c,
1377 0x0c8e, 0x0c90,
1378 0x0c92, 0x0ca8,
1379 0x0caa, 0x0cb3,
1380 0x0cb5, 0x0cb9,
1381 0x0cbc, 0x0cc4,
1382 0x0cc6, 0x0cc8,
1383 0x0cca, 0x0ccd,
1384 0x0cd5, 0x0cd6,
1385 0x0cde, 0x0cde,
1386 0x0ce0, 0x0ce1,
1387 0x0ce6, 0x0cef,
1388 0x0d02, 0x0d03,
1389 0x0d05, 0x0d0c,
1390 0x0d0e, 0x0d10,
1391 0x0d12, 0x0d28,
1392 0x0d2a, 0x0d39,
1393 0x0d3e, 0x0d43,
1394 0x0d46, 0x0d48,
1395 0x0d4a, 0x0d4d,
1396 0x0d57, 0x0d57,
1397 0x0d60, 0x0d61,
1398 0x0d66, 0x0d6f,
1399 0x0d82, 0x0d83,
1400 0x0d85, 0x0d96,
1401 0x0d9a, 0x0db1,
1402 0x0db3, 0x0dbb,
1403 0x0dbd, 0x0dbd,
1404 0x0dc0, 0x0dc6,
1405 0x0dca, 0x0dca,
1406 0x0dcf, 0x0dd4,
1407 0x0dd6, 0x0dd6,
1408 0x0dd8, 0x0ddf,
1409 0x0df2, 0x0df4,
1410 0x0e01, 0x0e3a,
1411 0x0e3f, 0x0e5b,
1412 0x0e81, 0x0e82,
1413 0x0e84, 0x0e84,
1414 0x0e87, 0x0e88,
1415 0x0e8a, 0x0e8a,
1416 0x0e8d, 0x0e8d,
1417 0x0e94, 0x0e97,
1418 0x0e99, 0x0e9f,
1419 0x0ea1, 0x0ea3,
1420 0x0ea5, 0x0ea5,
1421 0x0ea7, 0x0ea7,
1422 0x0eaa, 0x0eab,
1423 0x0ead, 0x0eb9,
1424 0x0ebb, 0x0ebd,
1425 0x0ec0, 0x0ec4,
1426 0x0ec6, 0x0ec6,
1427 0x0ec8, 0x0ecd,
1428 0x0ed0, 0x0ed9,
1429 0x0edc, 0x0edd,
1430 0x0f00, 0x0f47,
1431 0x0f49, 0x0f6a,
1432 0x0f71, 0x0f8b,
1433 0x0f90, 0x0f97,
1434 0x0f99, 0x0fbc,
1435 0x0fbe, 0x0fcc,
1436 0x0fcf, 0x0fcf,
1437 0x1000, 0x1021,
1438 0x1023, 0x1027,
1439 0x1029, 0x102a,
1440 0x102c, 0x1032,
1441 0x1036, 0x1039,
1442 0x1040, 0x1059,
1443 0x10a0, 0x10c5,
1444 0x10d0, 0x10f8,
1445 0x10fb, 0x10fb,
1446 0x1100, 0x1159,
1447 0x115f, 0x11a2,
1448 0x11a8, 0x11f9,
1449 0x1200, 0x1206,
1450 0x1208, 0x1246,
1451 0x1248, 0x1248,
1452 0x124a, 0x124d,
1453 0x1250, 0x1256,
1454 0x1258, 0x1258,
1455 0x125a, 0x125d,
1456 0x1260, 0x1286,
1457 0x1288, 0x1288,
1458 0x128a, 0x128d,
1459 0x1290, 0x12ae,
1460 0x12b0, 0x12b0,
1461 0x12b2, 0x12b5,
1462 0x12b8, 0x12be,
1463 0x12c0, 0x12c0,
1464 0x12c2, 0x12c5,
1465 0x12c8, 0x12ce,
1466 0x12d0, 0x12d6,
1467 0x12d8, 0x12ee,
1468 0x12f0, 0x130e,
1469 0x1310, 0x1310,
1470 0x1312, 0x1315,
1471 0x1318, 0x131e,
1472 0x1320, 0x1346,
1473 0x1348, 0x135a,
1474 0x1361, 0x137c,
1475 0x13a0, 0x13f4,
1476 0x1401, 0x1676,
1477 0x1681, 0x169c,
1478 0x16a0, 0x16f0,
1479 0x1700, 0x170c,
1480 0x170e, 0x1714,
1481 0x1720, 0x1736,
1482 0x1740, 0x1753,
1483 0x1760, 0x176c,
1484 0x176e, 0x1770,
1485 0x1772, 0x1773,
1486 0x1780, 0x17dd,
1487 0x17e0, 0x17e9,
1488 0x17f0, 0x17f9,
1489 0x1800, 0x180d,
1490 0x1810, 0x1819,
1491 0x1820, 0x1877,
1492 0x1880, 0x18a9,
1493 0x1900, 0x191c,
1494 0x1920, 0x192b,
1495 0x1930, 0x193b,
1496 0x1940, 0x1940,
1497 0x1944, 0x196d,
1498 0x1970, 0x1974,
1499 0x19e0, 0x19ff,
1500 0x1d00, 0x1d6b,
1501 0x1e00, 0x1e9b,
1502 0x1ea0, 0x1ef9,
1503 0x1f00, 0x1f15,
1504 0x1f18, 0x1f1d,
1505 0x1f20, 0x1f45,
1506 0x1f48, 0x1f4d,
1507 0x1f50, 0x1f57,
1508 0x1f59, 0x1f59,
1509 0x1f5b, 0x1f5b,
1510 0x1f5d, 0x1f5d,
1511 0x1f5f, 0x1f7d,
1512 0x1f80, 0x1fb4,
1513 0x1fb6, 0x1fc4,
1514 0x1fc6, 0x1fd3,
1515 0x1fd6, 0x1fdb,
1516 0x1fdd, 0x1fef,
1517 0x1ff2, 0x1ff4,
1518 0x1ff6, 0x1ffe,
1519 0x200b, 0x2027,
1520 0x202a, 0x202e,
1521 0x2030, 0x2054,
1522 0x2057, 0x2057,
1523 0x2060, 0x2063,
1524 0x206a, 0x2071,
1525 0x2074, 0x208e,
1526 0x20a0, 0x20b1,
1527 0x20d0, 0x20ea,
1528 0x2100, 0x213b,
1529 0x213d, 0x214b,
1530 0x2153, 0x2183,
1531 0x2190, 0x23d0,
1532 0x2400, 0x2426,
1533 0x2440, 0x244a,
1534 0x2460, 0x2617,
1535 0x2619, 0x267d,
1536 0x2680, 0x2691,
1537 0x26a0, 0x26a1,
1538 0x2701, 0x2704,
1539 0x2706, 0x2709,
1540 0x270c, 0x2727,
1541 0x2729, 0x274b,
1542 0x274d, 0x274d,
1543 0x274f, 0x2752,
1544 0x2756, 0x2756,
1545 0x2758, 0x275e,
1546 0x2761, 0x2794,
1547 0x2798, 0x27af,
1548 0x27b1, 0x27be,
1549 0x27d0, 0x27eb,
1550 0x27f0, 0x2b0d,
1551 0x2e80, 0x2e99,
1552 0x2e9b, 0x2ef3,
1553 0x2f00, 0x2fd5,
1554 0x2ff0, 0x2ffb,
1555 0x3001, 0x303f,
1556 0x3041, 0x3096,
1557 0x3099, 0x30ff,
1558 0x3105, 0x312c,
1559 0x3131, 0x318e,
1560 0x3190, 0x31b7,
1561 0x31f0, 0x321e,
1562 0x3220, 0x3243,
1563 0x3250, 0x327d,
1564 0x327f, 0x32fe,
1565 0x3300, 0x4db5,
1566 0x4dc0, 0x9fa5,
1567 0xa000, 0xa48c,
1568 0xa490, 0xa4c6,
1569 0xac00, 0xd7a3,
1570 0xe000, 0xfa2d,
1571 0xfa30, 0xfa6a,
1572 0xfb00, 0xfb06,
1573 0xfb13, 0xfb17,
1574 0xfb1d, 0xfb36,
1575 0xfb38, 0xfb3c,
1576 0xfb3e, 0xfb3e,
1577 0xfb40, 0xfb41,
1578 0xfb43, 0xfb44,
1579 0xfb46, 0xfbb1,
1580 0xfbd3, 0xfd3f,
1581 0xfd50, 0xfd8f,
1582 0xfd92, 0xfdc7,
1583 0xfdf0, 0xfdfd,
1584 0xfe00, 0xfe0f,
1585 0xfe20, 0xfe23,
1586 0xfe30, 0xfe52,
1587 0xfe54, 0xfe66,
1588 0xfe68, 0xfe6b,
1589 0xfe70, 0xfe74,
1590 0xfe76, 0xfefc,
1591 0xfeff, 0xfeff,
1592 0xff01, 0xffbe,
1593 0xffc2, 0xffc7,
1594 0xffca, 0xffcf,
1595 0xffd2, 0xffd7,
1596 0xffda, 0xffdc,
1597 0xffe0, 0xffe6,
1598 0xffe8, 0xffee,
1599 0xfff9, 0xfffd,
1600 0x10000, 0x1000b,
1601 0x1000d, 0x10026,
1602 0x10028, 0x1003a,
1603 0x1003c, 0x1003d,
1604 0x1003f, 0x1004d,
1605 0x10050, 0x1005d,
1606 0x10080, 0x100fa,
1607 0x10100, 0x10102,
1608 0x10107, 0x10133,
1609 0x10137, 0x1013f,
1610 0x10300, 0x1031e,
1611 0x10320, 0x10323,
1612 0x10330, 0x1034a,
1613 0x10380, 0x1039d,
1614 0x1039f, 0x1039f,
1615 0x10400, 0x1049d,
1616 0x104a0, 0x104a9,
1617 0x10800, 0x10805,
1618 0x10808, 0x10808,
1619 0x1080a, 0x10835,
1620 0x10837, 0x10838,
1621 0x1083c, 0x1083c,
1622 0x1083f, 0x1083f,
1623 0x1d000, 0x1d0f5,
1624 0x1d100, 0x1d126,
1625 0x1d12a, 0x1d1dd,
1626 0x1d300, 0x1d356,
1627 0x1d400, 0x1d454,
1628 0x1d456, 0x1d49c,
1629 0x1d49e, 0x1d49f,
1630 0x1d4a2, 0x1d4a2,
1631 0x1d4a5, 0x1d4a6,
1632 0x1d4a9, 0x1d4ac,
1633 0x1d4ae, 0x1d4b9,
1634 0x1d4bb, 0x1d4bb,
1635 0x1d4bd, 0x1d4c3,
1636 0x1d4c5, 0x1d505,
1637 0x1d507, 0x1d50a,
1638 0x1d50d, 0x1d514,
1639 0x1d516, 0x1d51c,
1640 0x1d51e, 0x1d539,
1641 0x1d53b, 0x1d53e,
1642 0x1d540, 0x1d544,
1643 0x1d546, 0x1d546,
1644 0x1d54a, 0x1d550,
1645 0x1d552, 0x1d6a3,
1646 0x1d6a8, 0x1d7c9,
1647 0x1d7ce, 0x1d7ff,
1648 0x20000, 0x2a6d6,
1649 0x2f800, 0x2fa1d,
1650 0xe0001, 0xe0001,
1651 0xe0020, 0xe007f,
1652 0xe0100, 0xe01ef,
1653 0xf0000, 0xffffd,
1654 0x100000, 0x10fffd
1655 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
1656 }; /* end of MBGraph */
1657
1658 static const OnigCodePoint SBLower[] = {
1659 1,
1660 0x0061, 0x007a
1661 };
1662
1663 static const OnigCodePoint MBLower[] = {
1664 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1665 423,
1666 #else
1667 5,
1668 #endif
1669 0x00aa, 0x00aa,
1670 0x00b5, 0x00b5,
1671 0x00ba, 0x00ba,
1672 0x00df, 0x00f6,
1673 0x00f8, 0x00ff
1674 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
1675 ,
1676 0x0101, 0x0101,
1677 0x0103, 0x0103,
1678 0x0105, 0x0105,
1679 0x0107, 0x0107,
1680 0x0109, 0x0109,
1681 0x010b, 0x010b,
1682 0x010d, 0x010d,
1683 0x010f, 0x010f,
1684 0x0111, 0x0111,
1685 0x0113, 0x0113,
1686 0x0115, 0x0115,
1687 0x0117, 0x0117,
1688 0x0119, 0x0119,
1689 0x011b, 0x011b,
1690 0x011d, 0x011d,
1691 0x011f, 0x011f,
1692 0x0121, 0x0121,
1693 0x0123, 0x0123,
1694 0x0125, 0x0125,
1695 0x0127, 0x0127,
1696 0x0129, 0x0129,
1697 0x012b, 0x012b,
1698 0x012d, 0x012d,
1699 0x012f, 0x012f,
1700 0x0131, 0x0131,
1701 0x0133, 0x0133,
1702 0x0135, 0x0135,
1703 0x0137, 0x0138,
1704 0x013a, 0x013a,
1705 0x013c, 0x013c,
1706 0x013e, 0x013e,
1707 0x0140, 0x0140,
1708 0x0142, 0x0142,
1709 0x0144, 0x0144,
1710 0x0146, 0x0146,
1711 0x0148, 0x0149,
1712 0x014b, 0x014b,
1713 0x014d, 0x014d,
1714 0x014f, 0x014f,
1715 0x0151, 0x0151,
1716 0x0153, 0x0153,
1717 0x0155, 0x0155,
1718 0x0157, 0x0157,
1719 0x0159, 0x0159,
1720 0x015b, 0x015b,
1721 0x015d, 0x015d,
1722 0x015f, 0x015f,
1723 0x0161, 0x0161,
1724 0x0163, 0x0163,
1725 0x0165, 0x0165,
1726 0x0167, 0x0167,
1727 0x0169, 0x0169,
1728 0x016b, 0x016b,
1729 0x016d, 0x016d,
1730 0x016f, 0x016f,
1731 0x0171, 0x0171,
1732 0x0173, 0x0173,
1733 0x0175, 0x0175,
1734 0x0177, 0x0177,
1735 0x017a, 0x017a,
1736 0x017c, 0x017c,
1737 0x017e, 0x0180,
1738 0x0183, 0x0183,
1739 0x0185, 0x0185,
1740 0x0188, 0x0188,
1741 0x018c, 0x018d,
1742 0x0192, 0x0192,
1743 0x0195, 0x0195,
1744 0x0199, 0x019b,
1745 0x019e, 0x019e,
1746 0x01a1, 0x01a1,
1747 0x01a3, 0x01a3,
1748 0x01a5, 0x01a5,
1749 0x01a8, 0x01a8,
1750 0x01aa, 0x01ab,
1751 0x01ad, 0x01ad,
1752 0x01b0, 0x01b0,
1753 0x01b4, 0x01b4,
1754 0x01b6, 0x01b6,
1755 0x01b9, 0x01ba,
1756 0x01bd, 0x01bf,
1757 0x01c6, 0x01c6,
1758 0x01c9, 0x01c9,
1759 0x01cc, 0x01cc,
1760 0x01ce, 0x01ce,
1761 0x01d0, 0x01d0,
1762 0x01d2, 0x01d2,
1763 0x01d4, 0x01d4,
1764 0x01d6, 0x01d6,
1765 0x01d8, 0x01d8,
1766 0x01da, 0x01da,
1767 0x01dc, 0x01dd,
1768 0x01df, 0x01df,
1769 0x01e1, 0x01e1,
1770 0x01e3, 0x01e3,
1771 0x01e5, 0x01e5,
1772 0x01e7, 0x01e7,
1773 0x01e9, 0x01e9,
1774 0x01eb, 0x01eb,
1775 0x01ed, 0x01ed,
1776 0x01ef, 0x01f0,
1777 0x01f3, 0x01f3,
1778 0x01f5, 0x01f5,
1779 0x01f9, 0x01f9,
1780 0x01fb, 0x01fb,
1781 0x01fd, 0x01fd,
1782 0x01ff, 0x01ff,
1783 0x0201, 0x0201,
1784 0x0203, 0x0203,
1785 0x0205, 0x0205,
1786 0x0207, 0x0207,
1787 0x0209, 0x0209,
1788 0x020b, 0x020b,
1789 0x020d, 0x020d,
1790 0x020f, 0x020f,
1791 0x0211, 0x0211,
1792 0x0213, 0x0213,
1793 0x0215, 0x0215,
1794 0x0217, 0x0217,
1795 0x0219, 0x0219,
1796 0x021b, 0x021b,
1797 0x021d, 0x021d,
1798 0x021f, 0x021f,
1799 0x0221, 0x0221,
1800 0x0223, 0x0223,
1801 0x0225, 0x0225,
1802 0x0227, 0x0227,
1803 0x0229, 0x0229,
1804 0x022b, 0x022b,
1805 0x022d, 0x022d,
1806 0x022f, 0x022f,
1807 0x0231, 0x0231,
1808 0x0233, 0x0236,
1809 0x0250, 0x02af,
1810 0x0390, 0x0390,
1811 0x03ac, 0x03ce,
1812 0x03d0, 0x03d1,
1813 0x03d5, 0x03d7,
1814 0x03d9, 0x03d9,
1815 0x03db, 0x03db,
1816 0x03dd, 0x03dd,
1817 0x03df, 0x03df,
1818 0x03e1, 0x03e1,
1819 0x03e3, 0x03e3,
1820 0x03e5, 0x03e5,
1821 0x03e7, 0x03e7,
1822 0x03e9, 0x03e9,
1823 0x03eb, 0x03eb,
1824 0x03ed, 0x03ed,
1825 0x03ef, 0x03f3,
1826 0x03f5, 0x03f5,
1827 0x03f8, 0x03f8,
1828 0x03fb, 0x03fb,
1829 0x0430, 0x045f,
1830 0x0461, 0x0461,
1831 0x0463, 0x0463,
1832 0x0465, 0x0465,
1833 0x0467, 0x0467,
1834 0x0469, 0x0469,
1835 0x046b, 0x046b,
1836 0x046d, 0x046d,
1837 0x046f, 0x046f,
1838 0x0471, 0x0471,
1839 0x0473, 0x0473,
1840 0x0475, 0x0475,
1841 0x0477, 0x0477,
1842 0x0479, 0x0479,
1843 0x047b, 0x047b,
1844 0x047d, 0x047d,
1845 0x047f, 0x047f,
1846 0x0481, 0x0481,
1847 0x048b, 0x048b,
1848 0x048d, 0x048d,
1849 0x048f, 0x048f,
1850 0x0491, 0x0491,
1851 0x0493, 0x0493,
1852 0x0495, 0x0495,
1853 0x0497, 0x0497,
1854 0x0499, 0x0499,
1855 0x049b, 0x049b,
1856 0x049d, 0x049d,
1857 0x049f, 0x049f,
1858 0x04a1, 0x04a1,
1859 0x04a3, 0x04a3,
1860 0x04a5, 0x04a5,
1861 0x04a7, 0x04a7,
1862 0x04a9, 0x04a9,
1863 0x04ab, 0x04ab,
1864 0x04ad, 0x04ad,
1865 0x04af, 0x04af,
1866 0x04b1, 0x04b1,
1867 0x04b3, 0x04b3,
1868 0x04b5, 0x04b5,
1869 0x04b7, 0x04b7,
1870 0x04b9, 0x04b9,
1871 0x04bb, 0x04bb,
1872 0x04bd, 0x04bd,
1873 0x04bf, 0x04bf,
1874 0x04c2, 0x04c2,
1875 0x04c4, 0x04c4,
1876 0x04c6, 0x04c6,
1877 0x04c8, 0x04c8,
1878 0x04ca, 0x04ca,
1879 0x04cc, 0x04cc,
1880 0x04ce, 0x04ce,
1881 0x04d1, 0x04d1,
1882 0x04d3, 0x04d3,
1883 0x04d5, 0x04d5,
1884 0x04d7, 0x04d7,
1885 0x04d9, 0x04d9,
1886 0x04db, 0x04db,
1887 0x04dd, 0x04dd,
1888 0x04df, 0x04df,
1889 0x04e1, 0x04e1,
1890 0x04e3, 0x04e3,
1891 0x04e5, 0x04e5,
1892 0x04e7, 0x04e7,
1893 0x04e9, 0x04e9,
1894 0x04eb, 0x04eb,
1895 0x04ed, 0x04ed,
1896 0x04ef, 0x04ef,
1897 0x04f1, 0x04f1,
1898 0x04f3, 0x04f3,
1899 0x04f5, 0x04f5,
1900 0x04f9, 0x04f9,
1901 0x0501, 0x0501,
1902 0x0503, 0x0503,
1903 0x0505, 0x0505,
1904 0x0507, 0x0507,
1905 0x0509, 0x0509,
1906 0x050b, 0x050b,
1907 0x050d, 0x050d,
1908 0x050f, 0x050f,
1909 0x0561, 0x0587,
1910 0x1d00, 0x1d2b,
1911 0x1d62, 0x1d6b,
1912 0x1e01, 0x1e01,
1913 0x1e03, 0x1e03,
1914 0x1e05, 0x1e05,
1915 0x1e07, 0x1e07,
1916 0x1e09, 0x1e09,
1917 0x1e0b, 0x1e0b,
1918 0x1e0d, 0x1e0d,
1919 0x1e0f, 0x1e0f,
1920 0x1e11, 0x1e11,
1921 0x1e13, 0x1e13,
1922 0x1e15, 0x1e15,
1923 0x1e17, 0x1e17,
1924 0x1e19, 0x1e19,
1925 0x1e1b, 0x1e1b,
1926 0x1e1d, 0x1e1d,
1927 0x1e1f, 0x1e1f,
1928 0x1e21, 0x1e21,
1929 0x1e23, 0x1e23,
1930 0x1e25, 0x1e25,
1931 0x1e27, 0x1e27,
1932 0x1e29, 0x1e29,
1933 0x1e2b, 0x1e2b,
1934 0x1e2d, 0x1e2d,
1935 0x1e2f, 0x1e2f,
1936 0x1e31, 0x1e31,
1937 0x1e33, 0x1e33,
1938 0x1e35, 0x1e35,
1939 0x1e37, 0x1e37,
1940 0x1e39, 0x1e39,
1941 0x1e3b, 0x1e3b,
1942 0x1e3d, 0x1e3d,
1943 0x1e3f, 0x1e3f,
1944 0x1e41, 0x1e41,
1945 0x1e43, 0x1e43,
1946 0x1e45, 0x1e45,
1947 0x1e47, 0x1e47,
1948 0x1e49, 0x1e49,
1949 0x1e4b, 0x1e4b,
1950 0x1e4d, 0x1e4d,
1951 0x1e4f, 0x1e4f,
1952 0x1e51, 0x1e51,
1953 0x1e53, 0x1e53,
1954 0x1e55, 0x1e55,
1955 0x1e57, 0x1e57,
1956 0x1e59, 0x1e59,
1957 0x1e5b, 0x1e5b,
1958 0x1e5d, 0x1e5d,
1959 0x1e5f, 0x1e5f,
1960 0x1e61, 0x1e61,
1961 0x1e63, 0x1e63,
1962 0x1e65, 0x1e65,
1963 0x1e67, 0x1e67,
1964 0x1e69, 0x1e69,
1965 0x1e6b, 0x1e6b,
1966 0x1e6d, 0x1e6d,
1967 0x1e6f, 0x1e6f,
1968 0x1e71, 0x1e71,
1969 0x1e73, 0x1e73,
1970 0x1e75, 0x1e75,
1971 0x1e77, 0x1e77,
1972 0x1e79, 0x1e79,
1973 0x1e7b, 0x1e7b,
1974 0x1e7d, 0x1e7d,
1975 0x1e7f, 0x1e7f,
1976 0x1e81, 0x1e81,
1977 0x1e83, 0x1e83,
1978 0x1e85, 0x1e85,
1979 0x1e87, 0x1e87,
1980 0x1e89, 0x1e89,
1981 0x1e8b, 0x1e8b,
1982 0x1e8d, 0x1e8d,
1983 0x1e8f, 0x1e8f,
1984 0x1e91, 0x1e91,
1985 0x1e93, 0x1e93,
1986 0x1e95, 0x1e9b,
1987 0x1ea1, 0x1ea1,
1988 0x1ea3, 0x1ea3,
1989 0x1ea5, 0x1ea5,
1990 0x1ea7, 0x1ea7,
1991 0x1ea9, 0x1ea9,
1992 0x1eab, 0x1eab,
1993 0x1ead, 0x1ead,
1994 0x1eaf, 0x1eaf,
1995 0x1eb1, 0x1eb1,
1996 0x1eb3, 0x1eb3,
1997 0x1eb5, 0x1eb5,
1998 0x1eb7, 0x1eb7,
1999 0x1eb9, 0x1eb9,
2000 0x1ebb, 0x1ebb,
2001 0x1ebd, 0x1ebd,
2002 0x1ebf, 0x1ebf,
2003 0x1ec1, 0x1ec1,
2004 0x1ec3, 0x1ec3,
2005 0x1ec5, 0x1ec5,
2006 0x1ec7, 0x1ec7,
2007 0x1ec9, 0x1ec9,
2008 0x1ecb, 0x1ecb,
2009 0x1ecd, 0x1ecd,
2010 0x1ecf, 0x1ecf,
2011 0x1ed1, 0x1ed1,
2012 0x1ed3, 0x1ed3,
2013 0x1ed5, 0x1ed5,
2014 0x1ed7, 0x1ed7,
2015 0x1ed9, 0x1ed9,
2016 0x1edb, 0x1edb,
2017 0x1edd, 0x1edd,
2018 0x1edf, 0x1edf,
2019 0x1ee1, 0x1ee1,
2020 0x1ee3, 0x1ee3,
2021 0x1ee5, 0x1ee5,
2022 0x1ee7, 0x1ee7,
2023 0x1ee9, 0x1ee9,
2024 0x1eeb, 0x1eeb,
2025 0x1eed, 0x1eed,
2026 0x1eef, 0x1eef,
2027 0x1ef1, 0x1ef1,
2028 0x1ef3, 0x1ef3,
2029 0x1ef5, 0x1ef5,
2030 0x1ef7, 0x1ef7,
2031 0x1ef9, 0x1ef9,
2032 0x1f00, 0x1f07,
2033 0x1f10, 0x1f15,
2034 0x1f20, 0x1f27,
2035 0x1f30, 0x1f37,
2036 0x1f40, 0x1f45,
2037 0x1f50, 0x1f57,
2038 0x1f60, 0x1f67,
2039 0x1f70, 0x1f7d,
2040 0x1f80, 0x1f87,
2041 0x1f90, 0x1f97,
2042 0x1fa0, 0x1fa7,
2043 0x1fb0, 0x1fb4,
2044 0x1fb6, 0x1fb7,
2045 0x1fbe, 0x1fbe,
2046 0x1fc2, 0x1fc4,
2047 0x1fc6, 0x1fc7,
2048 0x1fd0, 0x1fd3,
2049 0x1fd6, 0x1fd7,
2050 0x1fe0, 0x1fe7,
2051 0x1ff2, 0x1ff4,
2052 0x1ff6, 0x1ff7,
2053 0x2071, 0x2071,
2054 0x207f, 0x207f,
2055 0x210a, 0x210a,
2056 0x210e, 0x210f,
2057 0x2113, 0x2113,
2058 0x212f, 0x212f,
2059 0x2134, 0x2134,
2060 0x2139, 0x2139,
2061 0x213d, 0x213d,
2062 0x2146, 0x2149,
2063 0xfb00, 0xfb06,
2064 0xfb13, 0xfb17,
2065 0xff41, 0xff5a,
2066 0x10428, 0x1044f,
2067 0x1d41a, 0x1d433,
2068 0x1d44e, 0x1d454,
2069 0x1d456, 0x1d467,
2070 0x1d482, 0x1d49b,
2071 0x1d4b6, 0x1d4b9,
2072 0x1d4bb, 0x1d4bb,
2073 0x1d4bd, 0x1d4c3,
2074 0x1d4c5, 0x1d4cf,
2075 0x1d4ea, 0x1d503,
2076 0x1d51e, 0x1d537,
2077 0x1d552, 0x1d56b,
2078 0x1d586, 0x1d59f,
2079 0x1d5ba, 0x1d5d3,
2080 0x1d5ee, 0x1d607,
2081 0x1d622, 0x1d63b,
2082 0x1d656, 0x1d66f,
2083 0x1d68a, 0x1d6a3,
2084 0x1d6c2, 0x1d6da,
2085 0x1d6dc, 0x1d6e1,
2086 0x1d6fc, 0x1d714,
2087 0x1d716, 0x1d71b,
2088 0x1d736, 0x1d74e,
2089 0x1d750, 0x1d755,
2090 0x1d770, 0x1d788,
2091 0x1d78a, 0x1d78f,
2092 0x1d7aa, 0x1d7c2,
2093 0x1d7c4, 0x1d7c9
2094 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
2095 }; /* end of MBLower */
2096
2097 static const OnigCodePoint SBPrint[] = {
2098 2,
2099 0x0009, 0x000d,
2100 0x0020, 0x007e
2101 };
2102
2103 static const OnigCodePoint MBPrint[] = {
2104 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2105 403,
2106 #else
2107 2,
2108 #endif
2109 0x0085, 0x0085,
2110 0x00a0, 0x0236
2111 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2112 ,
2113 0x0250, 0x0357,
2114 0x035d, 0x036f,
2115 0x0374, 0x0375,
2116 0x037a, 0x037a,
2117 0x037e, 0x037e,
2118 0x0384, 0x038a,
2119 0x038c, 0x038c,
2120 0x038e, 0x03a1,
2121 0x03a3, 0x03ce,
2122 0x03d0, 0x03fb,
2123 0x0400, 0x0486,
2124 0x0488, 0x04ce,
2125 0x04d0, 0x04f5,
2126 0x04f8, 0x04f9,
2127 0x0500, 0x050f,
2128 0x0531, 0x0556,
2129 0x0559, 0x055f,
2130 0x0561, 0x0587,
2131 0x0589, 0x058a,
2132 0x0591, 0x05a1,
2133 0x05a3, 0x05b9,
2134 0x05bb, 0x05c4,
2135 0x05d0, 0x05ea,
2136 0x05f0, 0x05f4,
2137 0x0600, 0x0603,
2138 0x060c, 0x0615,
2139 0x061b, 0x061b,
2140 0x061f, 0x061f,
2141 0x0621, 0x063a,
2142 0x0640, 0x0658,
2143 0x0660, 0x070d,
2144 0x070f, 0x074a,
2145 0x074d, 0x074f,
2146 0x0780, 0x07b1,
2147 0x0901, 0x0939,
2148 0x093c, 0x094d,
2149 0x0950, 0x0954,
2150 0x0958, 0x0970,
2151 0x0981, 0x0983,
2152 0x0985, 0x098c,
2153 0x098f, 0x0990,
2154 0x0993, 0x09a8,
2155 0x09aa, 0x09b0,
2156 0x09b2, 0x09b2,
2157 0x09b6, 0x09b9,
2158 0x09bc, 0x09c4,
2159 0x09c7, 0x09c8,
2160 0x09cb, 0x09cd,
2161 0x09d7, 0x09d7,
2162 0x09dc, 0x09dd,
2163 0x09df, 0x09e3,
2164 0x09e6, 0x09fa,
2165 0x0a01, 0x0a03,
2166 0x0a05, 0x0a0a,
2167 0x0a0f, 0x0a10,
2168 0x0a13, 0x0a28,
2169 0x0a2a, 0x0a30,
2170 0x0a32, 0x0a33,
2171 0x0a35, 0x0a36,
2172 0x0a38, 0x0a39,
2173 0x0a3c, 0x0a3c,
2174 0x0a3e, 0x0a42,
2175 0x0a47, 0x0a48,
2176 0x0a4b, 0x0a4d,
2177 0x0a59, 0x0a5c,
2178 0x0a5e, 0x0a5e,
2179 0x0a66, 0x0a74,
2180 0x0a81, 0x0a83,
2181 0x0a85, 0x0a8d,
2182 0x0a8f, 0x0a91,
2183 0x0a93, 0x0aa8,
2184 0x0aaa, 0x0ab0,
2185 0x0ab2, 0x0ab3,
2186 0x0ab5, 0x0ab9,
2187 0x0abc, 0x0ac5,
2188 0x0ac7, 0x0ac9,
2189 0x0acb, 0x0acd,
2190 0x0ad0, 0x0ad0,
2191 0x0ae0, 0x0ae3,
2192 0x0ae6, 0x0aef,
2193 0x0af1, 0x0af1,
2194 0x0b01, 0x0b03,
2195 0x0b05, 0x0b0c,
2196 0x0b0f, 0x0b10,
2197 0x0b13, 0x0b28,
2198 0x0b2a, 0x0b30,
2199 0x0b32, 0x0b33,
2200 0x0b35, 0x0b39,
2201 0x0b3c, 0x0b43,
2202 0x0b47, 0x0b48,
2203 0x0b4b, 0x0b4d,
2204 0x0b56, 0x0b57,
2205 0x0b5c, 0x0b5d,
2206 0x0b5f, 0x0b61,
2207 0x0b66, 0x0b71,
2208 0x0b82, 0x0b83,
2209 0x0b85, 0x0b8a,
2210 0x0b8e, 0x0b90,
2211 0x0b92, 0x0b95,
2212 0x0b99, 0x0b9a,
2213 0x0b9c, 0x0b9c,
2214 0x0b9e, 0x0b9f,
2215 0x0ba3, 0x0ba4,
2216 0x0ba8, 0x0baa,
2217 0x0bae, 0x0bb5,
2218 0x0bb7, 0x0bb9,
2219 0x0bbe, 0x0bc2,
2220 0x0bc6, 0x0bc8,
2221 0x0bca, 0x0bcd,
2222 0x0bd7, 0x0bd7,
2223 0x0be7, 0x0bfa,
2224 0x0c01, 0x0c03,
2225 0x0c05, 0x0c0c,
2226 0x0c0e, 0x0c10,
2227 0x0c12, 0x0c28,
2228 0x0c2a, 0x0c33,
2229 0x0c35, 0x0c39,
2230 0x0c3e, 0x0c44,
2231 0x0c46, 0x0c48,
2232 0x0c4a, 0x0c4d,
2233 0x0c55, 0x0c56,
2234 0x0c60, 0x0c61,
2235 0x0c66, 0x0c6f,
2236 0x0c82, 0x0c83,
2237 0x0c85, 0x0c8c,
2238 0x0c8e, 0x0c90,
2239 0x0c92, 0x0ca8,
2240 0x0caa, 0x0cb3,
2241 0x0cb5, 0x0cb9,
2242 0x0cbc, 0x0cc4,
2243 0x0cc6, 0x0cc8,
2244 0x0cca, 0x0ccd,
2245 0x0cd5, 0x0cd6,
2246 0x0cde, 0x0cde,
2247 0x0ce0, 0x0ce1,
2248 0x0ce6, 0x0cef,
2249 0x0d02, 0x0d03,
2250 0x0d05, 0x0d0c,
2251 0x0d0e, 0x0d10,
2252 0x0d12, 0x0d28,
2253 0x0d2a, 0x0d39,
2254 0x0d3e, 0x0d43,
2255 0x0d46, 0x0d48,
2256 0x0d4a, 0x0d4d,
2257 0x0d57, 0x0d57,
2258 0x0d60, 0x0d61,
2259 0x0d66, 0x0d6f,
2260 0x0d82, 0x0d83,
2261 0x0d85, 0x0d96,
2262 0x0d9a, 0x0db1,
2263 0x0db3, 0x0dbb,
2264 0x0dbd, 0x0dbd,
2265 0x0dc0, 0x0dc6,
2266 0x0dca, 0x0dca,
2267 0x0dcf, 0x0dd4,
2268 0x0dd6, 0x0dd6,
2269 0x0dd8, 0x0ddf,
2270 0x0df2, 0x0df4,
2271 0x0e01, 0x0e3a,
2272 0x0e3f, 0x0e5b,
2273 0x0e81, 0x0e82,
2274 0x0e84, 0x0e84,
2275 0x0e87, 0x0e88,
2276 0x0e8a, 0x0e8a,
2277 0x0e8d, 0x0e8d,
2278 0x0e94, 0x0e97,
2279 0x0e99, 0x0e9f,
2280 0x0ea1, 0x0ea3,
2281 0x0ea5, 0x0ea5,
2282 0x0ea7, 0x0ea7,
2283 0x0eaa, 0x0eab,
2284 0x0ead, 0x0eb9,
2285 0x0ebb, 0x0ebd,
2286 0x0ec0, 0x0ec4,
2287 0x0ec6, 0x0ec6,
2288 0x0ec8, 0x0ecd,
2289 0x0ed0, 0x0ed9,
2290 0x0edc, 0x0edd,
2291 0x0f00, 0x0f47,
2292 0x0f49, 0x0f6a,
2293 0x0f71, 0x0f8b,
2294 0x0f90, 0x0f97,
2295 0x0f99, 0x0fbc,
2296 0x0fbe, 0x0fcc,
2297 0x0fcf, 0x0fcf,
2298 0x1000, 0x1021,
2299 0x1023, 0x1027,
2300 0x1029, 0x102a,
2301 0x102c, 0x1032,
2302 0x1036, 0x1039,
2303 0x1040, 0x1059,
2304 0x10a0, 0x10c5,
2305 0x10d0, 0x10f8,
2306 0x10fb, 0x10fb,
2307 0x1100, 0x1159,
2308 0x115f, 0x11a2,
2309 0x11a8, 0x11f9,
2310 0x1200, 0x1206,
2311 0x1208, 0x1246,
2312 0x1248, 0x1248,
2313 0x124a, 0x124d,
2314 0x1250, 0x1256,
2315 0x1258, 0x1258,
2316 0x125a, 0x125d,
2317 0x1260, 0x1286,
2318 0x1288, 0x1288,
2319 0x128a, 0x128d,
2320 0x1290, 0x12ae,
2321 0x12b0, 0x12b0,
2322 0x12b2, 0x12b5,
2323 0x12b8, 0x12be,
2324 0x12c0, 0x12c0,
2325 0x12c2, 0x12c5,
2326 0x12c8, 0x12ce,
2327 0x12d0, 0x12d6,
2328 0x12d8, 0x12ee,
2329 0x12f0, 0x130e,
2330 0x1310, 0x1310,
2331 0x1312, 0x1315,
2332 0x1318, 0x131e,
2333 0x1320, 0x1346,
2334 0x1348, 0x135a,
2335 0x1361, 0x137c,
2336 0x13a0, 0x13f4,
2337 0x1401, 0x1676,
2338 0x1680, 0x169c,
2339 0x16a0, 0x16f0,
2340 0x1700, 0x170c,
2341 0x170e, 0x1714,
2342 0x1720, 0x1736,
2343 0x1740, 0x1753,
2344 0x1760, 0x176c,
2345 0x176e, 0x1770,
2346 0x1772, 0x1773,
2347 0x1780, 0x17dd,
2348 0x17e0, 0x17e9,
2349 0x17f0, 0x17f9,
2350 0x1800, 0x180e,
2351 0x1810, 0x1819,
2352 0x1820, 0x1877,
2353 0x1880, 0x18a9,
2354 0x1900, 0x191c,
2355 0x1920, 0x192b,
2356 0x1930, 0x193b,
2357 0x1940, 0x1940,
2358 0x1944, 0x196d,
2359 0x1970, 0x1974,
2360 0x19e0, 0x19ff,
2361 0x1d00, 0x1d6b,
2362 0x1e00, 0x1e9b,
2363 0x1ea0, 0x1ef9,
2364 0x1f00, 0x1f15,
2365 0x1f18, 0x1f1d,
2366 0x1f20, 0x1f45,
2367 0x1f48, 0x1f4d,
2368 0x1f50, 0x1f57,
2369 0x1f59, 0x1f59,
2370 0x1f5b, 0x1f5b,
2371 0x1f5d, 0x1f5d,
2372 0x1f5f, 0x1f7d,
2373 0x1f80, 0x1fb4,
2374 0x1fb6, 0x1fc4,
2375 0x1fc6, 0x1fd3,
2376 0x1fd6, 0x1fdb,
2377 0x1fdd, 0x1fef,
2378 0x1ff2, 0x1ff4,
2379 0x1ff6, 0x1ffe,
2380 0x2000, 0x2054,
2381 0x2057, 0x2057,
2382 0x205f, 0x2063,
2383 0x206a, 0x2071,
2384 0x2074, 0x208e,
2385 0x20a0, 0x20b1,
2386 0x20d0, 0x20ea,
2387 0x2100, 0x213b,
2388 0x213d, 0x214b,
2389 0x2153, 0x2183,
2390 0x2190, 0x23d0,
2391 0x2400, 0x2426,
2392 0x2440, 0x244a,
2393 0x2460, 0x2617,
2394 0x2619, 0x267d,
2395 0x2680, 0x2691,
2396 0x26a0, 0x26a1,
2397 0x2701, 0x2704,
2398 0x2706, 0x2709,
2399 0x270c, 0x2727,
2400 0x2729, 0x274b,
2401 0x274d, 0x274d,
2402 0x274f, 0x2752,
2403 0x2756, 0x2756,
2404 0x2758, 0x275e,
2405 0x2761, 0x2794,
2406 0x2798, 0x27af,
2407 0x27b1, 0x27be,
2408 0x27d0, 0x27eb,
2409 0x27f0, 0x2b0d,
2410 0x2e80, 0x2e99,
2411 0x2e9b, 0x2ef3,
2412 0x2f00, 0x2fd5,
2413 0x2ff0, 0x2ffb,
2414 0x3000, 0x303f,
2415 0x3041, 0x3096,
2416 0x3099, 0x30ff,
2417 0x3105, 0x312c,
2418 0x3131, 0x318e,
2419 0x3190, 0x31b7,
2420 0x31f0, 0x321e,
2421 0x3220, 0x3243,
2422 0x3250, 0x327d,
2423 0x327f, 0x32fe,
2424 0x3300, 0x4db5,
2425 0x4dc0, 0x9fa5,
2426 0xa000, 0xa48c,
2427 0xa490, 0xa4c6,
2428 0xac00, 0xd7a3,
2429 0xe000, 0xfa2d,
2430 0xfa30, 0xfa6a,
2431 0xfb00, 0xfb06,
2432 0xfb13, 0xfb17,
2433 0xfb1d, 0xfb36,
2434 0xfb38, 0xfb3c,
2435 0xfb3e, 0xfb3e,
2436 0xfb40, 0xfb41,
2437 0xfb43, 0xfb44,
2438 0xfb46, 0xfbb1,
2439 0xfbd3, 0xfd3f,
2440 0xfd50, 0xfd8f,
2441 0xfd92, 0xfdc7,
2442 0xfdf0, 0xfdfd,
2443 0xfe00, 0xfe0f,
2444 0xfe20, 0xfe23,
2445 0xfe30, 0xfe52,
2446 0xfe54, 0xfe66,
2447 0xfe68, 0xfe6b,
2448 0xfe70, 0xfe74,
2449 0xfe76, 0xfefc,
2450 0xfeff, 0xfeff,
2451 0xff01, 0xffbe,
2452 0xffc2, 0xffc7,
2453 0xffca, 0xffcf,
2454 0xffd2, 0xffd7,
2455 0xffda, 0xffdc,
2456 0xffe0, 0xffe6,
2457 0xffe8, 0xffee,
2458 0xfff9, 0xfffd,
2459 0x10000, 0x1000b,
2460 0x1000d, 0x10026,
2461 0x10028, 0x1003a,
2462 0x1003c, 0x1003d,
2463 0x1003f, 0x1004d,
2464 0x10050, 0x1005d,
2465 0x10080, 0x100fa,
2466 0x10100, 0x10102,
2467 0x10107, 0x10133,
2468 0x10137, 0x1013f,
2469 0x10300, 0x1031e,
2470 0x10320, 0x10323,
2471 0x10330, 0x1034a,
2472 0x10380, 0x1039d,
2473 0x1039f, 0x1039f,
2474 0x10400, 0x1049d,
2475 0x104a0, 0x104a9,
2476 0x10800, 0x10805,
2477 0x10808, 0x10808,
2478 0x1080a, 0x10835,
2479 0x10837, 0x10838,
2480 0x1083c, 0x1083c,
2481 0x1083f, 0x1083f,
2482 0x1d000, 0x1d0f5,
2483 0x1d100, 0x1d126,
2484 0x1d12a, 0x1d1dd,
2485 0x1d300, 0x1d356,
2486 0x1d400, 0x1d454,
2487 0x1d456, 0x1d49c,
2488 0x1d49e, 0x1d49f,
2489 0x1d4a2, 0x1d4a2,
2490 0x1d4a5, 0x1d4a6,
2491 0x1d4a9, 0x1d4ac,
2492 0x1d4ae, 0x1d4b9,
2493 0x1d4bb, 0x1d4bb,
2494 0x1d4bd, 0x1d4c3,
2495 0x1d4c5, 0x1d505,
2496 0x1d507, 0x1d50a,
2497 0x1d50d, 0x1d514,
2498 0x1d516, 0x1d51c,
2499 0x1d51e, 0x1d539,
2500 0x1d53b, 0x1d53e,
2501 0x1d540, 0x1d544,
2502 0x1d546, 0x1d546,
2503 0x1d54a, 0x1d550,
2504 0x1d552, 0x1d6a3,
2505 0x1d6a8, 0x1d7c9,
2506 0x1d7ce, 0x1d7ff,
2507 0x20000, 0x2a6d6,
2508 0x2f800, 0x2fa1d,
2509 0xe0001, 0xe0001,
2510 0xe0020, 0xe007f,
2511 0xe0100, 0xe01ef,
2512 0xf0000, 0xffffd,
2513 0x100000, 0x10fffd
2514 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
2515 }; /* end of MBPrint */
2516
2517 static const OnigCodePoint SBPunct[] = {
2518 9,
2519 0x0021, 0x0023,
2520 0x0025, 0x002a,
2521 0x002c, 0x002f,
2522 0x003a, 0x003b,
2523 0x003f, 0x0040,
2524 0x005b, 0x005d,
2525 0x005f, 0x005f,
2526 0x007b, 0x007b,
2527 0x007d, 0x007d
2528 }; /* end of SBPunct */
2529
2530 static const OnigCodePoint MBPunct[] = {
2531 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2532 77,
2533 #else
2534 5,
2535 #endif
2536 0x00a1, 0x00a1,
2537 0x00ab, 0x00ab,
2538 0x00b7, 0x00b7,
2539 0x00bb, 0x00bb,
2540 0x00bf, 0x00bf
2541 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2542 ,
2543 0x037e, 0x037e,
2544 0x0387, 0x0387,
2545 0x055a, 0x055f,
2546 0x0589, 0x058a,
2547 0x05be, 0x05be,
2548 0x05c0, 0x05c0,
2549 0x05c3, 0x05c3,
2550 0x05f3, 0x05f4,
2551 0x060c, 0x060d,
2552 0x061b, 0x061b,
2553 0x061f, 0x061f,
2554 0x066a, 0x066d,
2555 0x06d4, 0x06d4,
2556 0x0700, 0x070d,
2557 0x0964, 0x0965,
2558 0x0970, 0x0970,
2559 0x0df4, 0x0df4,
2560 0x0e4f, 0x0e4f,
2561 0x0e5a, 0x0e5b,
2562 0x0f04, 0x0f12,
2563 0x0f3a, 0x0f3d,
2564 0x0f85, 0x0f85,
2565 0x104a, 0x104f,
2566 0x10fb, 0x10fb,
2567 0x1361, 0x1368,
2568 0x166d, 0x166e,
2569 0x169b, 0x169c,
2570 0x16eb, 0x16ed,
2571 0x1735, 0x1736,
2572 0x17d4, 0x17d6,
2573 0x17d8, 0x17da,
2574 0x1800, 0x180a,
2575 0x1944, 0x1945,
2576 0x2010, 0x2027,
2577 0x2030, 0x2043,
2578 0x2045, 0x2051,
2579 0x2053, 0x2054,
2580 0x2057, 0x2057,
2581 0x207d, 0x207e,
2582 0x208d, 0x208e,
2583 0x2329, 0x232a,
2584 0x23b4, 0x23b6,
2585 0x2768, 0x2775,
2586 0x27e6, 0x27eb,
2587 0x2983, 0x2998,
2588 0x29d8, 0x29db,
2589 0x29fc, 0x29fd,
2590 0x3001, 0x3003,
2591 0x3008, 0x3011,
2592 0x3014, 0x301f,
2593 0x3030, 0x3030,
2594 0x303d, 0x303d,
2595 0x30a0, 0x30a0,
2596 0x30fb, 0x30fb,
2597 0xfd3e, 0xfd3f,
2598 0xfe30, 0xfe52,
2599 0xfe54, 0xfe61,
2600 0xfe63, 0xfe63,
2601 0xfe68, 0xfe68,
2602 0xfe6a, 0xfe6b,
2603 0xff01, 0xff03,
2604 0xff05, 0xff0a,
2605 0xff0c, 0xff0f,
2606 0xff1a, 0xff1b,
2607 0xff1f, 0xff20,
2608 0xff3b, 0xff3d,
2609 0xff3f, 0xff3f,
2610 0xff5b, 0xff5b,
2611 0xff5d, 0xff5d,
2612 0xff5f, 0xff65,
2613 0x10100, 0x10101,
2614 0x1039f, 0x1039f
2615 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
2616 }; /* end of MBPunct */
2617
2618 static const OnigCodePoint SBSpace[] = {
2619 2,
2620 0x0009, 0x000d,
2621 0x0020, 0x0020
2622 };
2623
2624 static const OnigCodePoint MBSpace[] = {
2625 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2626 9,
2627 #else
2628 2,
2629 #endif
2630 0x0085, 0x0085,
2631 0x00a0, 0x00a0
2632 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2633 ,
2634 0x1680, 0x1680,
2635 0x180e, 0x180e,
2636 0x2000, 0x200a,
2637 0x2028, 0x2029,
2638 0x202f, 0x202f,
2639 0x205f, 0x205f,
2640 0x3000, 0x3000
2641 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
2642 }; /* end of MBSpace */
2643
2644 static const OnigCodePoint SBUpper[] = {
2645 1,
2646 0x0041, 0x005a
2647 };
2648
2649 static const OnigCodePoint MBUpper[] = {
2650 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2651 420,
2652 #else
2653 2,
2654 #endif
2655 0x00c0, 0x00d6,
2656 0x00d8, 0x00de
2657 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
2658 ,
2659 0x0100, 0x0100,
2660 0x0102, 0x0102,
2661 0x0104, 0x0104,
2662 0x0106, 0x0106,
2663 0x0108, 0x0108,
2664 0x010a, 0x010a,
2665 0x010c, 0x010c,
2666 0x010e, 0x010e,
2667 0x0110, 0x0110,
2668 0x0112, 0x0112,
2669 0x0114, 0x0114,
2670 0x0116, 0x0116,
2671 0x0118, 0x0118,
2672 0x011a, 0x011a,
2673 0x011c, 0x011c,
2674 0x011e, 0x011e,
2675 0x0120, 0x0120,
2676 0x0122, 0x0122,
2677 0x0124, 0x0124,
2678 0x0126, 0x0126,
2679 0x0128, 0x0128,
2680 0x012a, 0x012a,
2681 0x012c, 0x012c,
2682 0x012e, 0x012e,
2683 0x0130, 0x0130,
2684 0x0132, 0x0132,
2685 0x0134, 0x0134,
2686 0x0136, 0x0136,
2687 0x0139, 0x0139,
2688 0x013b, 0x013b,
2689 0x013d, 0x013d,
2690 0x013f, 0x013f,
2691 0x0141, 0x0141,
2692 0x0143, 0x0143,
2693 0x0145, 0x0145,
2694 0x0147, 0x0147,
2695 0x014a, 0x014a,
2696 0x014c, 0x014c,
2697 0x014e, 0x014e,
2698 0x0150, 0x0150,
2699 0x0152, 0x0152,
2700 0x0154, 0x0154,
2701 0x0156, 0x0156,
2702 0x0158, 0x0158,
2703 0x015a, 0x015a,
2704 0x015c, 0x015c,
2705 0x015e, 0x015e,
2706 0x0160, 0x0160,
2707 0x0162, 0x0162,
2708 0x0164, 0x0164,
2709 0x0166, 0x0166,
2710 0x0168, 0x0168,
2711 0x016a, 0x016a,
2712 0x016c, 0x016c,
2713 0x016e, 0x016e,
2714 0x0170, 0x0170,
2715 0x0172, 0x0172,
2716 0x0174, 0x0174,
2717 0x0176, 0x0176,
2718 0x0178, 0x0179,
2719 0x017b, 0x017b,
2720 0x017d, 0x017d,
2721 0x0181, 0x0182,
2722 0x0184, 0x0184,
2723 0x0186, 0x0187,
2724 0x0189, 0x018b,
2725 0x018e, 0x0191,
2726 0x0193, 0x0194,
2727 0x0196, 0x0198,
2728 0x019c, 0x019d,
2729 0x019f, 0x01a0,
2730 0x01a2, 0x01a2,
2731 0x01a4, 0x01a4,
2732 0x01a6, 0x01a7,
2733 0x01a9, 0x01a9,
2734 0x01ac, 0x01ac,
2735 0x01ae, 0x01af,
2736 0x01b1, 0x01b3,
2737 0x01b5, 0x01b5,
2738 0x01b7, 0x01b8,
2739 0x01bc, 0x01bc,
2740 0x01c4, 0x01c4,
2741 0x01c7, 0x01c7,
2742 0x01ca, 0x01ca,
2743 0x01cd, 0x01cd,
2744 0x01cf, 0x01cf,
2745 0x01d1, 0x01d1,
2746 0x01d3, 0x01d3,
2747 0x01d5, 0x01d5,
2748 0x01d7, 0x01d7,
2749 0x01d9, 0x01d9,
2750 0x01db, 0x01db,
2751 0x01de, 0x01de,
2752 0x01e0, 0x01e0,
2753 0x01e2, 0x01e2,
2754 0x01e4, 0x01e4,
2755 0x01e6, 0x01e6,
2756 0x01e8, 0x01e8,
2757 0x01ea, 0x01ea,
2758 0x01ec, 0x01ec,
2759 0x01ee, 0x01ee,
2760 0x01f1, 0x01f1,
2761 0x01f4, 0x01f4,
2762 0x01f6, 0x01f8,
2763 0x01fa, 0x01fa,
2764 0x01fc, 0x01fc,
2765 0x01fe, 0x01fe,
2766 0x0200, 0x0200,
2767 0x0202, 0x0202,
2768 0x0204, 0x0204,
2769 0x0206, 0x0206,
2770 0x0208, 0x0208,
2771 0x020a, 0x020a,
2772 0x020c, 0x020c,
2773 0x020e, 0x020e,
2774 0x0210, 0x0210,
2775 0x0212, 0x0212,
2776 0x0214, 0x0214,
2777 0x0216, 0x0216,
2778 0x0218, 0x0218,
2779 0x021a, 0x021a,
2780 0x021c, 0x021c,
2781 0x021e, 0x021e,
2782 0x0220, 0x0220,
2783 0x0222, 0x0222,
2784 0x0224, 0x0224,
2785 0x0226, 0x0226,
2786 0x0228, 0x0228,
2787 0x022a, 0x022a,
2788 0x022c, 0x022c,
2789 0x022e, 0x022e,
2790 0x0230, 0x0230,
2791 0x0232, 0x0232,
2792 0x0386, 0x0386,
2793 0x0388, 0x038a,
2794 0x038c, 0x038c,
2795 0x038e, 0x038f,
2796 0x0391, 0x03a1,
2797 0x03a3, 0x03ab,
2798 0x03d2, 0x03d4,
2799 0x03d8, 0x03d8,
2800 0x03da, 0x03da,
2801 0x03dc, 0x03dc,
2802 0x03de, 0x03de,
2803 0x03e0, 0x03e0,
2804 0x03e2, 0x03e2,
2805 0x03e4, 0x03e4,
2806 0x03e6, 0x03e6,
2807 0x03e8, 0x03e8,
2808 0x03ea, 0x03ea,
2809 0x03ec, 0x03ec,
2810 0x03ee, 0x03ee,
2811 0x03f4, 0x03f4,
2812 0x03f7, 0x03f7,
2813 0x03f9, 0x03fa,
2814 0x0400, 0x042f,
2815 0x0460, 0x0460,
2816 0x0462, 0x0462,
2817 0x0464, 0x0464,
2818 0x0466, 0x0466,
2819 0x0468, 0x0468,
2820 0x046a, 0x046a,
2821 0x046c, 0x046c,
2822 0x046e, 0x046e,
2823 0x0470, 0x0470,
2824 0x0472, 0x0472,
2825 0x0474, 0x0474,
2826 0x0476, 0x0476,
2827 0x0478, 0x0478,
2828 0x047a, 0x047a,
2829 0x047c, 0x047c,
2830 0x047e, 0x047e,
2831 0x0480, 0x0480,
2832 0x048a, 0x048a,
2833 0x048c, 0x048c,
2834 0x048e, 0x048e,
2835 0x0490, 0x0490,
2836 0x0492, 0x0492,
2837 0x0494, 0x0494,
2838 0x0496, 0x0496,
2839 0x0498, 0x0498,
2840 0x049a, 0x049a,
2841 0x049c, 0x049c,
2842 0x049e, 0x049e,
2843 0x04a0, 0x04a0,
2844 0x04a2, 0x04a2,
2845 0x04a4, 0x04a4,
2846 0x04a6, 0x04a6,
2847 0x04a8, 0x04a8,
2848 0x04aa, 0x04aa,
2849 0x04ac, 0x04ac,
2850 0x04ae, 0x04ae,
2851 0x04b0, 0x04b0,
2852 0x04b2, 0x04b2,
2853 0x04b4, 0x04b4,
2854 0x04b6, 0x04b6,
2855 0x04b8, 0x04b8,
2856 0x04ba, 0x04ba,
2857 0x04bc, 0x04bc,
2858 0x04be, 0x04be,
2859 0x04c0, 0x04c1,
2860 0x04c3, 0x04c3,
2861 0x04c5, 0x04c5,
2862 0x04c7, 0x04c7,
2863 0x04c9, 0x04c9,
2864 0x04cb, 0x04cb,
2865 0x04cd, 0x04cd,
2866 0x04d0, 0x04d0,
2867 0x04d2, 0x04d2,
2868 0x04d4, 0x04d4,
2869 0x04d6, 0x04d6,
2870 0x04d8, 0x04d8,
2871 0x04da, 0x04da,
2872 0x04dc, 0x04dc,
2873 0x04de, 0x04de,
2874 0x04e0, 0x04e0,
2875 0x04e2, 0x04e2,
2876 0x04e4, 0x04e4,
2877 0x04e6, 0x04e6,
2878 0x04e8, 0x04e8,
2879 0x04ea, 0x04ea,
2880 0x04ec, 0x04ec,
2881 0x04ee, 0x04ee,
2882 0x04f0, 0x04f0,
2883 0x04f2, 0x04f2,
2884 0x04f4, 0x04f4,
2885 0x04f8, 0x04f8,
2886 0x0500, 0x0500,
2887 0x0502, 0x0502,
2888 0x0504, 0x0504,
2889 0x0506, 0x0506,
2890 0x0508, 0x0508,
2891 0x050a, 0x050a,
2892 0x050c, 0x050c,
2893 0x050e, 0x050e,
2894 0x0531, 0x0556,
2895 0x10a0, 0x10c5,
2896 0x1e00, 0x1e00,
2897 0x1e02, 0x1e02,
2898 0x1e04, 0x1e04,
2899 0x1e06, 0x1e06,
2900 0x1e08, 0x1e08,
2901 0x1e0a, 0x1e0a,
2902 0x1e0c, 0x1e0c,
2903 0x1e0e, 0x1e0e,
2904 0x1e10, 0x1e10,
2905 0x1e12, 0x1e12,
2906 0x1e14, 0x1e14,
2907 0x1e16, 0x1e16,
2908 0x1e18, 0x1e18,
2909 0x1e1a, 0x1e1a,
2910 0x1e1c, 0x1e1c,
2911 0x1e1e, 0x1e1e,
2912 0x1e20, 0x1e20,
2913 0x1e22, 0x1e22,
2914 0x1e24, 0x1e24,
2915 0x1e26, 0x1e26,
2916 0x1e28, 0x1e28,
2917 0x1e2a, 0x1e2a,
2918 0x1e2c, 0x1e2c,
2919 0x1e2e, 0x1e2e,
2920 0x1e30, 0x1e30,
2921 0x1e32, 0x1e32,
2922 0x1e34, 0x1e34,
2923 0x1e36, 0x1e36,
2924 0x1e38, 0x1e38,
2925 0x1e3a, 0x1e3a,
2926 0x1e3c, 0x1e3c,
2927 0x1e3e, 0x1e3e,
2928 0x1e40, 0x1e40,
2929 0x1e42, 0x1e42,
2930 0x1e44, 0x1e44,
2931 0x1e46, 0x1e46,
2932 0x1e48, 0x1e48,
2933 0x1e4a, 0x1e4a,
2934 0x1e4c, 0x1e4c,
2935 0x1e4e, 0x1e4e,
2936 0x1e50, 0x1e50,
2937 0x1e52, 0x1e52,
2938 0x1e54, 0x1e54,
2939 0x1e56, 0x1e56,
2940 0x1e58, 0x1e58,
2941 0x1e5a, 0x1e5a,
2942 0x1e5c, 0x1e5c,
2943 0x1e5e, 0x1e5e,
2944 0x1e60, 0x1e60,
2945 0x1e62, 0x1e62,
2946 0x1e64, 0x1e64,
2947 0x1e66, 0x1e66,
2948 0x1e68, 0x1e68,
2949 0x1e6a, 0x1e6a,
2950 0x1e6c, 0x1e6c,
2951 0x1e6e, 0x1e6e,
2952 0x1e70, 0x1e70,
2953 0x1e72, 0x1e72,
2954 0x1e74, 0x1e74,
2955 0x1e76, 0x1e76,
2956 0x1e78, 0x1e78,
2957 0x1e7a, 0x1e7a,
2958 0x1e7c, 0x1e7c,
2959 0x1e7e, 0x1e7e,
2960 0x1e80, 0x1e80,
2961 0x1e82, 0x1e82,
2962 0x1e84, 0x1e84,
2963 0x1e86, 0x1e86,
2964 0x1e88, 0x1e88,
2965 0x1e8a, 0x1e8a,
2966 0x1e8c, 0x1e8c,
2967 0x1e8e, 0x1e8e,
2968 0x1e90, 0x1e90,
2969 0x1e92, 0x1e92,
2970 0x1e94, 0x1e94,
2971 0x1ea0, 0x1ea0,
2972 0x1ea2, 0x1ea2,
2973 0x1ea4, 0x1ea4,
2974 0x1ea6, 0x1ea6,
2975 0x1ea8, 0x1ea8,
2976 0x1eaa, 0x1eaa,
2977 0x1eac, 0x1eac,
2978 0x1eae, 0x1eae,
2979 0x1eb0, 0x1eb0,
2980 0x1eb2, 0x1eb2,
2981 0x1eb4, 0x1eb4,
2982 0x1eb6, 0x1eb6,
2983 0x1eb8, 0x1eb8,
2984 0x1eba, 0x1eba,
2985 0x1ebc, 0x1ebc,
2986 0x1ebe, 0x1ebe,
2987 0x1ec0, 0x1ec0,
2988 0x1ec2, 0x1ec2,
2989 0x1ec4, 0x1ec4,
2990 0x1ec6, 0x1ec6,
2991 0x1ec8, 0x1ec8,
2992 0x1eca, 0x1eca,
2993 0x1ecc, 0x1ecc,
2994 0x1ece, 0x1ece,
2995 0x1ed0, 0x1ed0,
2996 0x1ed2, 0x1ed2,
2997 0x1ed4, 0x1ed4,
2998 0x1ed6, 0x1ed6,
2999 0x1ed8, 0x1ed8,
3000 0x1eda, 0x1eda,
3001 0x1edc, 0x1edc,
3002 0x1ede, 0x1ede,
3003 0x1ee0, 0x1ee0,
3004 0x1ee2, 0x1ee2,
3005 0x1ee4, 0x1ee4,
3006 0x1ee6, 0x1ee6,
3007 0x1ee8, 0x1ee8,
3008 0x1eea, 0x1eea,
3009 0x1eec, 0x1eec,
3010 0x1eee, 0x1eee,
3011 0x1ef0, 0x1ef0,
3012 0x1ef2, 0x1ef2,
3013 0x1ef4, 0x1ef4,
3014 0x1ef6, 0x1ef6,
3015 0x1ef8, 0x1ef8,
3016 0x1f08, 0x1f0f,
3017 0x1f18, 0x1f1d,
3018 0x1f28, 0x1f2f,
3019 0x1f38, 0x1f3f,
3020 0x1f48, 0x1f4d,
3021 0x1f59, 0x1f59,
3022 0x1f5b, 0x1f5b,
3023 0x1f5d, 0x1f5d,
3024 0x1f5f, 0x1f5f,
3025 0x1f68, 0x1f6f,
3026 0x1fb8, 0x1fbb,
3027 0x1fc8, 0x1fcb,
3028 0x1fd8, 0x1fdb,
3029 0x1fe8, 0x1fec,
3030 0x1ff8, 0x1ffb,
3031 0x2102, 0x2102,
3032 0x2107, 0x2107,
3033 0x210b, 0x210d,
3034 0x2110, 0x2112,
3035 0x2115, 0x2115,
3036 0x2119, 0x211d,
3037 0x2124, 0x2124,
3038 0x2126, 0x2126,
3039 0x2128, 0x2128,
3040 0x212a, 0x212d,
3041 0x2130, 0x2131,
3042 0x2133, 0x2133,
3043 0x213e, 0x213f,
3044 0x2145, 0x2145,
3045 0xff21, 0xff3a,
3046 0x10400, 0x10427,
3047 0x1d400, 0x1d419,
3048 0x1d434, 0x1d44d,
3049 0x1d468, 0x1d481,
3050 0x1d49c, 0x1d49c,
3051 0x1d49e, 0x1d49f,
3052 0x1d4a2, 0x1d4a2,
3053 0x1d4a5, 0x1d4a6,
3054 0x1d4a9, 0x1d4ac,
3055 0x1d4ae, 0x1d4b5,
3056 0x1d4d0, 0x1d4e9,
3057 0x1d504, 0x1d505,
3058 0x1d507, 0x1d50a,
3059 0x1d50d, 0x1d514,
3060 0x1d516, 0x1d51c,
3061 0x1d538, 0x1d539,
3062 0x1d53b, 0x1d53e,
3063 0x1d540, 0x1d544,
3064 0x1d546, 0x1d546,
3065 0x1d54a, 0x1d550,
3066 0x1d56c, 0x1d585,
3067 0x1d5a0, 0x1d5b9,
3068 0x1d5d4, 0x1d5ed,
3069 0x1d608, 0x1d621,
3070 0x1d63c, 0x1d655,
3071 0x1d670, 0x1d689,
3072 0x1d6a8, 0x1d6c0,
3073 0x1d6e2, 0x1d6fa,
3074 0x1d71c, 0x1d734,
3075 0x1d756, 0x1d76e,
3076 0x1d790, 0x1d7a8
3077 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
3078 }; /* end of MBUpper */
3079
3080 static const OnigCodePoint SBXDigit[] = {
3081 3,
3082 0x0030, 0x0039,
3083 0x0041, 0x0046,
3084 0x0061, 0x0066
3085 };
3086
3087 static const OnigCodePoint SBASCII[] = {
3088 1,
3089 0x0000, 0x007f
3090 };
3091
3092 static const OnigCodePoint SBWord[] = {
3093 4,
3094 0x0030, 0x0039,
3095 0x0041, 0x005a,
3096 0x005f, 0x005f,
3097 0x0061, 0x007a
3098 };
3099
3100 static const OnigCodePoint MBWord[] = {
3101 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
3102 432,
3103 #else
3104 8,
3105 #endif
3106 0x00aa, 0x00aa,
3107 0x00b2, 0x00b3,
3108 0x00b5, 0x00b5,
3109 0x00b9, 0x00ba,
3110 0x00bc, 0x00be,
3111 0x00c0, 0x00d6,
3112 0x00d8, 0x00f6,
3113 #ifndef USE_UNICODE_FULL_RANGE_CTYPE
3114 0x00f8, 0x7fffffff
3115 #else /* not USE_UNICODE_FULL_RANGE_CTYPE */
3116 0x00f8, 0x0236,
3117 0x0250, 0x02c1,
3118 0x02c6, 0x02d1,
3119 0x02e0, 0x02e4,
3120 0x02ee, 0x02ee,
3121 0x0300, 0x0357,
3122 0x035d, 0x036f,
3123 0x037a, 0x037a,
3124 0x0386, 0x0386,
3125 0x0388, 0x038a,
3126 0x038c, 0x038c,
3127 0x038e, 0x03a1,
3128 0x03a3, 0x03ce,
3129 0x03d0, 0x03f5,
3130 0x03f7, 0x03fb,
3131 0x0400, 0x0481,
3132 0x0483, 0x0486,
3133 0x0488, 0x04ce,
3134 0x04d0, 0x04f5,
3135 0x04f8, 0x04f9,
3136 0x0500, 0x050f,
3137 0x0531, 0x0556,
3138 0x0559, 0x0559,
3139 0x0561, 0x0587,
3140 0x0591, 0x05a1,
3141 0x05a3, 0x05b9,
3142 0x05bb, 0x05bd,
3143 0x05bf, 0x05bf,
3144 0x05c1, 0x05c2,
3145 0x05c4, 0x05c4,
3146 0x05d0, 0x05ea,
3147 0x05f0, 0x05f2,
3148 0x0610, 0x0615,
3149 0x0621, 0x063a,
3150 0x0640, 0x0658,
3151 0x0660, 0x0669,
3152 0x066e, 0x06d3,
3153 0x06d5, 0x06dc,
3154 0x06de, 0x06e8,
3155 0x06ea, 0x06fc,
3156 0x06ff, 0x06ff,
3157 0x0710, 0x074a,
3158 0x074d, 0x074f,
3159 0x0780, 0x07b1,
3160 0x0901, 0x0939,
3161 0x093c, 0x094d,
3162 0x0950, 0x0954,
3163 0x0958, 0x0963,
3164 0x0966, 0x096f,
3165 0x0981, 0x0983,
3166 0x0985, 0x098c,
3167 0x098f, 0x0990,
3168 0x0993, 0x09a8,
3169 0x09aa, 0x09b0,
3170 0x09b2, 0x09b2,
3171 0x09b6, 0x09b9,
3172 0x09bc, 0x09c4,
3173 0x09c7, 0x09c8,
3174 0x09cb, 0x09cd,
3175 0x09d7, 0x09d7,
3176 0x09dc, 0x09dd,
3177 0x09df, 0x09e3,
3178 0x09e6, 0x09f1,
3179 0x09f4, 0x09f9,
3180 0x0a01, 0x0a03,
3181 0x0a05, 0x0a0a,
3182 0x0a0f, 0x0a10,
3183 0x0a13, 0x0a28,
3184 0x0a2a, 0x0a30,
3185 0x0a32, 0x0a33,
3186 0x0a35, 0x0a36,
3187 0x0a38, 0x0a39,
3188 0x0a3c, 0x0a3c,
3189 0x0a3e, 0x0a42,
3190 0x0a47, 0x0a48,
3191 0x0a4b, 0x0a4d,
3192 0x0a59, 0x0a5c,
3193 0x0a5e, 0x0a5e,
3194 0x0a66, 0x0a74,
3195 0x0a81, 0x0a83,
3196 0x0a85, 0x0a8d,
3197 0x0a8f, 0x0a91,
3198 0x0a93, 0x0aa8,
3199 0x0aaa, 0x0ab0,
3200 0x0ab2, 0x0ab3,
3201 0x0ab5, 0x0ab9,
3202 0x0abc, 0x0ac5,
3203 0x0ac7, 0x0ac9,
3204 0x0acb, 0x0acd,
3205 0x0ad0, 0x0ad0,
3206 0x0ae0, 0x0ae3,
3207 0x0ae6, 0x0aef,
3208 0x0b01, 0x0b03,
3209 0x0b05, 0x0b0c,
3210 0x0b0f, 0x0b10,
3211 0x0b13, 0x0b28,
3212 0x0b2a, 0x0b30,
3213 0x0b32, 0x0b33,
3214 0x0b35, 0x0b39,
3215 0x0b3c, 0x0b43,
3216 0x0b47, 0x0b48,
3217 0x0b4b, 0x0b4d,
3218 0x0b56, 0x0b57,
3219 0x0b5c, 0x0b5d,
3220 0x0b5f, 0x0b61,
3221 0x0b66, 0x0b6f,
3222 0x0b71, 0x0b71,
3223 0x0b82, 0x0b83,
3224 0x0b85, 0x0b8a,
3225 0x0b8e, 0x0b90,
3226 0x0b92, 0x0b95,
3227 0x0b99, 0x0b9a,
3228 0x0b9c, 0x0b9c,
3229 0x0b9e, 0x0b9f,
3230 0x0ba3, 0x0ba4,
3231 0x0ba8, 0x0baa,
3232 0x0bae, 0x0bb5,
3233 0x0bb7, 0x0bb9,
3234 0x0bbe, 0x0bc2,
3235 0x0bc6, 0x0bc8,
3236 0x0bca, 0x0bcd,
3237 0x0bd7, 0x0bd7,
3238 0x0be7, 0x0bf2,
3239 0x0c01, 0x0c03,
3240 0x0c05, 0x0c0c,
3241 0x0c0e, 0x0c10,
3242 0x0c12, 0x0c28,
3243 0x0c2a, 0x0c33,
3244 0x0c35, 0x0c39,
3245 0x0c3e, 0x0c44,
3246 0x0c46, 0x0c48,
3247 0x0c4a, 0x0c4d,
3248 0x0c55, 0x0c56,
3249 0x0c60, 0x0c61,
3250 0x0c66, 0x0c6f,
3251 0x0c82, 0x0c83,
3252 0x0c85, 0x0c8c,
3253 0x0c8e, 0x0c90,
3254 0x0c92, 0x0ca8,
3255 0x0caa, 0x0cb3,
3256 0x0cb5, 0x0cb9,
3257 0x0cbc, 0x0cc4,
3258 0x0cc6, 0x0cc8,
3259 0x0cca, 0x0ccd,
3260 0x0cd5, 0x0cd6,
3261 0x0cde, 0x0cde,
3262 0x0ce0, 0x0ce1,
3263 0x0ce6, 0x0cef,
3264 0x0d02, 0x0d03,
3265 0x0d05, 0x0d0c,
3266 0x0d0e, 0x0d10,
3267 0x0d12, 0x0d28,
3268 0x0d2a, 0x0d39,
3269 0x0d3e, 0x0d43,
3270 0x0d46, 0x0d48,
3271 0x0d4a, 0x0d4d,
3272 0x0d57, 0x0d57,
3273 0x0d60, 0x0d61,
3274 0x0d66, 0x0d6f,
3275 0x0d82, 0x0d83,
3276 0x0d85, 0x0d96,
3277 0x0d9a, 0x0db1,
3278 0x0db3, 0x0dbb,
3279 0x0dbd, 0x0dbd,
3280 0x0dc0, 0x0dc6,
3281 0x0dca, 0x0dca,
3282 0x0dcf, 0x0dd4,
3283 0x0dd6, 0x0dd6,
3284 0x0dd8, 0x0ddf,
3285 0x0df2, 0x0df3,
3286 0x0e01, 0x0e3a,
3287 0x0e40, 0x0e4e,
3288 0x0e50, 0x0e59,
3289 0x0e81, 0x0e82,
3290 0x0e84, 0x0e84,
3291 0x0e87, 0x0e88,
3292 0x0e8a, 0x0e8a,
3293 0x0e8d, 0x0e8d,
3294 0x0e94, 0x0e97,
3295 0x0e99, 0x0e9f,
3296 0x0ea1, 0x0ea3,
3297 0x0ea5, 0x0ea5,
3298 0x0ea7, 0x0ea7,
3299 0x0eaa, 0x0eab,
3300 0x0ead, 0x0eb9,
3301 0x0ebb, 0x0ebd,
3302 0x0ec0, 0x0ec4,
3303 0x0ec6, 0x0ec6,
3304 0x0ec8, 0x0ecd,
3305 0x0ed0, 0x0ed9,
3306 0x0edc, 0x0edd,
3307 0x0f00, 0x0f00,
3308 0x0f18, 0x0f19,
3309 0x0f20, 0x0f33,
3310 0x0f35, 0x0f35,
3311 0x0f37, 0x0f37,
3312 0x0f39, 0x0f39,
3313 0x0f3e, 0x0f47,
3314 0x0f49, 0x0f6a,
3315 0x0f71, 0x0f84,
3316 0x0f86, 0x0f8b,
3317 0x0f90, 0x0f97,
3318 0x0f99, 0x0fbc,
3319 0x0fc6, 0x0fc6,
3320 0x1000, 0x1021,
3321 0x1023, 0x1027,
3322 0x1029, 0x102a,
3323 0x102c, 0x1032,
3324 0x1036, 0x1039,
3325 0x1040, 0x1049,
3326 0x1050, 0x1059,
3327 0x10a0, 0x10c5,
3328 0x10d0, 0x10f8,
3329 0x1100, 0x1159,
3330 0x115f, 0x11a2,
3331 0x11a8, 0x11f9,
3332 0x1200, 0x1206,
3333 0x1208, 0x1246,
3334 0x1248, 0x1248,
3335 0x124a, 0x124d,
3336 0x1250, 0x1256,
3337 0x1258, 0x1258,
3338 0x125a, 0x125d,
3339 0x1260, 0x1286,
3340 0x1288, 0x1288,
3341 0x128a, 0x128d,
3342 0x1290, 0x12ae,
3343 0x12b0, 0x12b0,
3344 0x12b2, 0x12b5,
3345 0x12b8, 0x12be,
3346 0x12c0, 0x12c0,
3347 0x12c2, 0x12c5,
3348 0x12c8, 0x12ce,
3349 0x12d0, 0x12d6,
3350 0x12d8, 0x12ee,
3351 0x12f0, 0x130e,
3352 0x1310, 0x1310,
3353 0x1312, 0x1315,
3354 0x1318, 0x131e,
3355 0x1320, 0x1346,
3356 0x1348, 0x135a,
3357 0x1369, 0x137c,
3358 0x13a0, 0x13f4,
3359 0x1401, 0x166c,
3360 0x166f, 0x1676,
3361 0x1681, 0x169a,
3362 0x16a0, 0x16ea,
3363 0x16ee, 0x16f0,
3364 0x1700, 0x170c,
3365 0x170e, 0x1714,
3366 0x1720, 0x1734,
3367 0x1740, 0x1753,
3368 0x1760, 0x176c,
3369 0x176e, 0x1770,
3370 0x1772, 0x1773,
3371 0x1780, 0x17b3,
3372 0x17b6, 0x17d3,
3373 0x17d7, 0x17d7,
3374 0x17dc, 0x17dd,
3375 0x17e0, 0x17e9,
3376 0x17f0, 0x17f9,
3377 0x180b, 0x180d,
3378 0x1810, 0x1819,
3379 0x1820, 0x1877,
3380 0x1880, 0x18a9,
3381 0x1900, 0x191c,
3382 0x1920, 0x192b,
3383 0x1930, 0x193b,
3384 0x1946, 0x196d,
3385 0x1970, 0x1974,
3386 0x1d00, 0x1d6b,
3387 0x1e00, 0x1e9b,
3388 0x1ea0, 0x1ef9,
3389 0x1f00, 0x1f15,
3390 0x1f18, 0x1f1d,
3391 0x1f20, 0x1f45,
3392 0x1f48, 0x1f4d,
3393 0x1f50, 0x1f57,
3394 0x1f59, 0x1f59,
3395 0x1f5b, 0x1f5b,
3396 0x1f5d, 0x1f5d,
3397 0x1f5f, 0x1f7d,
3398 0x1f80, 0x1fb4,
3399 0x1fb6, 0x1fbc,
3400 0x1fbe, 0x1fbe,
3401 0x1fc2, 0x1fc4,
3402 0x1fc6, 0x1fcc,
3403 0x1fd0, 0x1fd3,
3404 0x1fd6, 0x1fdb,
3405 0x1fe0, 0x1fec,
3406 0x1ff2, 0x1ff4,
3407 0x1ff6, 0x1ffc,
3408 0x203f, 0x2040,
3409 0x2054, 0x2054,
3410 0x2070, 0x2071,
3411 0x2074, 0x2079,
3412 0x207f, 0x2089,
3413 0x20d0, 0x20ea,
3414 0x2102, 0x2102,
3415 0x2107, 0x2107,
3416 0x210a, 0x2113,
3417 0x2115, 0x2115,
3418 0x2119, 0x211d,
3419 0x2124, 0x2124,
3420 0x2126, 0x2126,
3421 0x2128, 0x2128,
3422 0x212a, 0x212d,
3423 0x212f, 0x2131,
3424 0x2133, 0x2139,
3425 0x213d, 0x213f,
3426 0x2145, 0x2149,
3427 0x2153, 0x2183,
3428 0x2460, 0x249b,
3429 0x24ea, 0x24ff,
3430 0x2776, 0x2793,
3431 0x3005, 0x3007,
3432 0x3021, 0x302f,
3433 0x3031, 0x3035,
3434 0x3038, 0x303c,
3435 0x3041, 0x3096,
3436 0x3099, 0x309a,
3437 0x309d, 0x309f,
3438 0x30a1, 0x30ff,
3439 0x3105, 0x312c,
3440 0x3131, 0x318e,
3441 0x3192, 0x3195,
3442 0x31a0, 0x31b7,
3443 0x31f0, 0x31ff,
3444 0x3220, 0x3229,
3445 0x3251, 0x325f,
3446 0x3280, 0x3289,
3447 0x32b1, 0x32bf,
3448 0x3400, 0x4db5,
3449 0x4e00, 0x9fa5,
3450 0xa000, 0xa48c,
3451 0xac00, 0xd7a3,
3452 0xf900, 0xfa2d,
3453 0xfa30, 0xfa6a,
3454 0xfb00, 0xfb06,
3455 0xfb13, 0xfb17,
3456 0xfb1d, 0xfb28,
3457 0xfb2a, 0xfb36,
3458 0xfb38, 0xfb3c,
3459 0xfb3e, 0xfb3e,
3460 0xfb40, 0xfb41,
3461 0xfb43, 0xfb44,
3462 0xfb46, 0xfbb1,
3463 0xfbd3, 0xfd3d,
3464 0xfd50, 0xfd8f,
3465 0xfd92, 0xfdc7,
3466 0xfdf0, 0xfdfb,
3467 0xfe00, 0xfe0f,
3468 0xfe20, 0xfe23,
3469 0xfe33, 0xfe34,
3470 0xfe4d, 0xfe4f,
3471 0xfe70, 0xfe74,
3472 0xfe76, 0xfefc,
3473 0xff10, 0xff19,
3474 0xff21, 0xff3a,
3475 0xff3f, 0xff3f,
3476 0xff41, 0xff5a,
3477 0xff65, 0xffbe,
3478 0xffc2, 0xffc7,
3479 0xffca, 0xffcf,
3480 0xffd2, 0xffd7,
3481 0xffda, 0xffdc,
3482 0x10000, 0x1000b,
3483 0x1000d, 0x10026,
3484 0x10028, 0x1003a,
3485 0x1003c, 0x1003d,
3486 0x1003f, 0x1004d,
3487 0x10050, 0x1005d,
3488 0x10080, 0x100fa,
3489 0x10107, 0x10133,
3490 0x10300, 0x1031e,
3491 0x10320, 0x10323,
3492 0x10330, 0x1034a,
3493 0x10380, 0x1039d,
3494 0x10400, 0x1049d,
3495 0x104a0, 0x104a9,
3496 0x10800, 0x10805,
3497 0x10808, 0x10808,
3498 0x1080a, 0x10835,
3499 0x10837, 0x10838,
3500 0x1083c, 0x1083c,
3501 0x1083f, 0x1083f,
3502 0x1d165, 0x1d169,
3503 0x1d16d, 0x1d172,
3504 0x1d17b, 0x1d182,
3505 0x1d185, 0x1d18b,
3506 0x1d1aa, 0x1d1ad,
3507 0x1d400, 0x1d454,
3508 0x1d456, 0x1d49c,
3509 0x1d49e, 0x1d49f,
3510 0x1d4a2, 0x1d4a2,
3511 0x1d4a5, 0x1d4a6,
3512 0x1d4a9, 0x1d4ac,
3513 0x1d4ae, 0x1d4b9,
3514 0x1d4bb, 0x1d4bb,
3515 0x1d4bd, 0x1d4c3,
3516 0x1d4c5, 0x1d505,
3517 0x1d507, 0x1d50a,
3518 0x1d50d, 0x1d514,
3519 0x1d516, 0x1d51c,
3520 0x1d51e, 0x1d539,
3521 0x1d53b, 0x1d53e,
3522 0x1d540, 0x1d544,
3523 0x1d546, 0x1d546,
3524 0x1d54a, 0x1d550,
3525 0x1d552, 0x1d6a3,
3526 0x1d6a8, 0x1d6c0,
3527 0x1d6c2, 0x1d6da,
3528 0x1d6dc, 0x1d6fa,
3529 0x1d6fc, 0x1d714,
3530 0x1d716, 0x1d734,
3531 0x1d736, 0x1d74e,
3532 0x1d750, 0x1d76e,
3533 0x1d770, 0x1d788,
3534 0x1d78a, 0x1d7a8,
3535 0x1d7aa, 0x1d7c2,
3536 0x1d7c4, 0x1d7c9,
3537 0x1d7ce, 0x1d7ff,
3538 0x20000, 0x2a6d6,
3539 0x2f800, 0x2fa1d,
3540 0xe0100, 0xe01ef
3541 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
3542 }; /* end of MBWord */
3543
3544
3545 static int
utf8_get_ctype_code_range(int ctype,const OnigCodePoint * sbr[],const OnigCodePoint * mbr[])3546 utf8_get_ctype_code_range(int ctype,
3547 const OnigCodePoint* sbr[], const OnigCodePoint* mbr[])
3548 {
3549 #define CR_SET(sbl,mbl) do { \
3550 *sbr = sbl; \
3551 *mbr = mbl; \
3552 } while (0)
3553
3554 #define CR_SB_SET(sbl) do { \
3555 *sbr = sbl; \
3556 *mbr = EmptyRange; \
3557 } while (0)
3558
3559 switch (ctype) {
3560 case ONIGENC_CTYPE_ALPHA:
3561 CR_SET(SBAlpha, MBAlpha);
3562 break;
3563 case ONIGENC_CTYPE_BLANK:
3564 CR_SET(SBBlank, MBBlank);
3565 break;
3566 case ONIGENC_CTYPE_CNTRL:
3567 CR_SET(SBCntrl, MBCntrl);
3568 break;
3569 case ONIGENC_CTYPE_DIGIT:
3570 CR_SET(SBDigit, MBDigit);
3571 break;
3572 case ONIGENC_CTYPE_GRAPH:
3573 CR_SET(SBGraph, MBGraph);
3574 break;
3575 case ONIGENC_CTYPE_LOWER:
3576 CR_SET(SBLower, MBLower);
3577 break;
3578 case ONIGENC_CTYPE_PRINT:
3579 CR_SET(SBPrint, MBPrint);
3580 break;
3581 case ONIGENC_CTYPE_PUNCT:
3582 CR_SET(SBPunct, MBPunct);
3583 break;
3584 case ONIGENC_CTYPE_SPACE:
3585 CR_SET(SBSpace, MBSpace);
3586 break;
3587 case ONIGENC_CTYPE_UPPER:
3588 CR_SET(SBUpper, MBUpper);
3589 break;
3590 case ONIGENC_CTYPE_XDIGIT:
3591 CR_SB_SET(SBXDigit);
3592 break;
3593 case ONIGENC_CTYPE_WORD:
3594 CR_SET(SBWord, MBWord);
3595 break;
3596 case ONIGENC_CTYPE_ASCII:
3597 CR_SB_SET(SBASCII);
3598 break;
3599 case ONIGENC_CTYPE_ALNUM:
3600 CR_SET(SBAlnum, MBAlnum);
3601 break;
3602
3603 default:
3604 return ONIGENCERR_TYPE_BUG;
3605 break;
3606 }
3607
3608 return 0;
3609 }
3610
3611 static int
utf8_is_code_ctype(OnigCodePoint code,unsigned int ctype)3612 utf8_is_code_ctype(OnigCodePoint code, unsigned int ctype)
3613 {
3614 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
3615 const OnigCodePoint *range;
3616 #endif
3617
3618 if (code < 256) {
3619 return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype);
3620 }
3621
3622 #ifdef USE_UNICODE_FULL_RANGE_CTYPE
3623
3624 switch (ctype) {
3625 case ONIGENC_CTYPE_ALPHA:
3626 range = MBAlpha;
3627 break;
3628 case ONIGENC_CTYPE_BLANK:
3629 range = MBBlank;
3630 break;
3631 case ONIGENC_CTYPE_CNTRL:
3632 range = MBCntrl;
3633 break;
3634 case ONIGENC_CTYPE_DIGIT:
3635 range = MBDigit;
3636 break;
3637 case ONIGENC_CTYPE_GRAPH:
3638 range = MBGraph;
3639 break;
3640 case ONIGENC_CTYPE_LOWER:
3641 range = MBLower;
3642 break;
3643 case ONIGENC_CTYPE_PRINT:
3644 range = MBPrint;
3645 break;
3646 case ONIGENC_CTYPE_PUNCT:
3647 range = MBPunct;
3648 break;
3649 case ONIGENC_CTYPE_SPACE:
3650 range = MBSpace;
3651 break;
3652 case ONIGENC_CTYPE_UPPER:
3653 range = MBUpper;
3654 break;
3655 case ONIGENC_CTYPE_XDIGIT:
3656 return FALSE;
3657 break;
3658 case ONIGENC_CTYPE_WORD:
3659 range = MBWord;
3660 break;
3661 case ONIGENC_CTYPE_ASCII:
3662 return FALSE;
3663 break;
3664 case ONIGENC_CTYPE_ALNUM:
3665 range = MBAlnum;
3666 break;
3667 case ONIGENC_CTYPE_NEWLINE:
3668 return FALSE;
3669 break;
3670
3671 default:
3672 return ONIGENCERR_TYPE_BUG;
3673 break;
3674 }
3675
3676 return onig_is_in_code_range((UChar* )range, code);
3677
3678 #else
3679
3680 if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
3681 #ifdef USE_INVALID_CODE_SCHEME
3682 if (code <= VALID_CODE_LIMIT)
3683 #endif
3684 return TRUE;
3685 }
3686 #endif /* USE_UNICODE_FULL_RANGE_CTYPE */
3687
3688 return FALSE;
3689 }
3690
3691 static UChar*
utf8_left_adjust_char_head(const UChar * start,const UChar * s)3692 utf8_left_adjust_char_head(const UChar* start, const UChar* s)
3693 {
3694 const UChar *p;
3695
3696 if (s <= start) return (UChar* )s;
3697 p = s;
3698
3699 while (!utf8_islead(*p) && p > start) p--;
3700 return (UChar* )p;
3701 }
3702
3703 OnigEncodingType OnigEncodingUTF8 = {
3704 utf8_mbc_enc_len,
3705 "UTF-8", /* name */
3706 6, /* max byte length */
3707 1, /* min byte length */
3708 (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
3709 ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
3710 {
3711 (OnigCodePoint )'\\' /* esc */
3712 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
3713 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
3714 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
3715 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
3716 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
3717 },
3718 utf8_is_mbc_newline,
3719 utf8_mbc_to_code,
3720 utf8_code_to_mbclen,
3721 utf8_code_to_mbc,
3722 utf8_mbc_to_normalize,
3723 utf8_is_mbc_ambiguous,
3724 onigenc_iso_8859_1_get_all_pair_ambig_codes,
3725 onigenc_ess_tsett_get_all_comp_ambig_codes,
3726 utf8_is_code_ctype,
3727 utf8_get_ctype_code_range,
3728 utf8_left_adjust_char_head,
3729 onigenc_always_true_is_allowed_reverse_match
3730 };
3731