/* Generated by re2c */ #line 1 "unicode_group_N.u--encoding-policy(fail).re" #include #define YYCTYPE unsigned int bool scan(const YYCTYPE * start, const YYCTYPE * const limit) { __attribute__((unused)) const YYCTYPE * YYMARKER; // silence compiler warnings when YYMARKER is not used # define YYCURSOR start N: #line 13 "unicode_group_N.u--encoding-policy(fail).c" { YYCTYPE yych; yych = *YYCURSOR; if (yych <= 0x00002184) { if (yych <= 0x00000ECF) { if (yych <= 0x000009F9) { if (yych <= 0x00000669) { if (yych <= 0x000000B8) { if (yych <= '9') { if (yych >= '0') goto yy4; } else { if (yych <= 0x000000B1) goto yy2; if (yych <= 0x000000B3) goto yy4; } } else { if (yych <= 0x000000BB) { if (yych <= 0x000000B9) goto yy4; } else { if (yych <= 0x000000BE) goto yy4; if (yych >= 0x00000660) goto yy4; } } } else { if (yych <= 0x00000965) { if (yych <= 0x000006F9) { if (yych >= 0x000006F0) goto yy4; } else { if (yych <= 0x000007BF) goto yy2; if (yych <= 0x000007C9) goto yy4; } } else { if (yych <= 0x000009E5) { if (yych <= 0x0000096F) goto yy4; } else { if (yych <= 0x000009EF) goto yy4; if (yych >= 0x000009F4) goto yy4; } } } } else { if (yych <= 0x00000BF2) { if (yych <= 0x00000B65) { if (yych <= 0x00000A6F) { if (yych >= 0x00000A66) goto yy4; } else { if (yych <= 0x00000AE5) goto yy2; if (yych <= 0x00000AEF) goto yy4; } } else { if (yych <= 0x00000B71) { if (yych <= 0x00000B6F) goto yy4; } else { if (yych <= 0x00000B77) goto yy4; if (yych >= 0x00000BE6) goto yy4; } } } else { if (yych <= 0x00000CE5) { if (yych <= 0x00000C6F) { if (yych >= 0x00000C66) goto yy4; } else { if (yych <= 0x00000C77) goto yy2; if (yych <= 0x00000C7E) goto yy4; } } else { if (yych <= 0x00000D75) { if (yych <= 0x00000CEF) goto yy4; if (yych >= 0x00000D66) goto yy4; } else { if (yych <= 0x00000E4F) goto yy2; if (yych <= 0x00000E59) goto yy4; } } } } } else { if (yych <= 0x000019DA) { if (yych <= 0x000016ED) { if (yych <= 0x00001049) { if (yych <= 0x00000F1F) { if (yych <= 0x00000ED9) goto yy4; } else { if (yych <= 0x00000F33) goto yy4; if (yych >= 0x00001040) goto yy4; } } else { if (yych <= 0x00001099) { if (yych >= 0x00001090) goto yy4; } else { if (yych <= 0x00001368) goto yy2; if (yych <= 0x0000137C) goto yy4; } } } else { if (yych <= 0x000017F9) { if (yych <= 0x000017DF) { if (yych <= 0x000016F0) goto yy4; } else { if (yych <= 0x000017E9) goto yy4; if (yych >= 0x000017F0) goto yy4; } } else { if (yych <= 0x00001945) { if (yych <= 0x0000180F) goto yy2; if (yych <= 0x00001819) goto yy4; } else { if (yych <= 0x0000194F) goto yy4; if (yych >= 0x000019D0) goto yy4; } } } } else { if (yych <= 0x00001C49) { if (yych <= 0x00001B4F) { if (yych <= 0x00001A89) { if (yych >= 0x00001A80) goto yy4; } else { if (yych <= 0x00001A8F) goto yy2; if (yych <= 0x00001A99) goto yy4; } } else { if (yych <= 0x00001BAF) { if (yych <= 0x00001B59) goto yy4; } else { if (yych <= 0x00001BB9) goto yy4; if (yych >= 0x00001C40) goto yy4; } } } else { if (yych <= 0x00002073) { if (yych <= 0x00001C59) { if (yych >= 0x00001C50) goto yy4; } else { if (yych == 0x00002070) goto yy4; } } else { if (yych <= 0x00002089) { if (yych <= 0x00002079) goto yy4; if (yych >= 0x00002080) goto yy4; } else { if (yych <= 0x0000214F) goto yy2; if (yych <= 0x00002182) goto yy4; } } } } } } else { if (yych <= 0x0000FF0F) { if (yych <= 0x0000325F) { if (yych <= 0x00003006) { if (yych <= 0x000024FF) { if (yych <= 0x0000245F) { if (yych <= 0x00002189) goto yy4; } else { if (yych <= 0x0000249B) goto yy4; if (yych >= 0x000024EA) goto yy4; } } else { if (yych <= 0x00002793) { if (yych >= 0x00002776) goto yy4; } else { if (yych == 0x00002CFD) goto yy4; } } } else { if (yych <= 0x0000303A) { if (yych <= 0x00003020) { if (yych <= 0x00003007) goto yy4; } else { if (yych <= 0x00003029) goto yy4; if (yych >= 0x00003038) goto yy4; } } else { if (yych <= 0x0000321F) { if (yych <= 0x00003191) goto yy2; if (yych <= 0x00003195) goto yy4; } else { if (yych <= 0x00003229) goto yy4; if (yych >= 0x00003251) goto yy4; } } } } else { if (yych <= 0x0000A835) { if (yych <= 0x0000A61F) { if (yych <= 0x00003289) { if (yych >= 0x00003280) goto yy4; } else { if (yych <= 0x000032B0) goto yy2; if (yych <= 0x000032BF) goto yy4; } } else { if (yych <= 0x0000A6E5) { if (yych <= 0x0000A629) goto yy4; } else { if (yych <= 0x0000A6EF) goto yy4; if (yych >= 0x0000A830) goto yy4; } } } else { if (yych <= 0x0000A9CF) { if (yych <= 0x0000A8D9) { if (yych >= 0x0000A8D0) goto yy4; } else { if (yych <= 0x0000A8FF) goto yy2; if (yych <= 0x0000A909) goto yy4; } } else { if (yych <= 0x0000AA59) { if (yych <= 0x0000A9D9) goto yy4; if (yych >= 0x0000AA50) goto yy4; } else { if (yych <= 0x0000ABEF) goto yy2; if (yych <= 0x0000ABF9) goto yy4; } } } } } else { if (yych <= 0x0001091B) { if (yych <= 0x00010340) { if (yych <= 0x00010178) { if (yych <= 0x00010106) { if (yych <= 0x0000FF19) goto yy4; } else { if (yych <= 0x00010133) goto yy4; if (yych >= 0x00010140) goto yy4; } } else { if (yych <= 0x0001018A) { if (yych >= 0x0001018A) goto yy4; } else { if (yych <= 0x0001031F) goto yy2; if (yych <= 0x00010323) goto yy4; } } } else { if (yych <= 0x000103D5) { if (yych <= 0x00010349) { if (yych <= 0x00010341) goto yy4; } else { if (yych <= 0x0001034A) goto yy4; if (yych >= 0x000103D1) goto yy4; } } else { if (yych <= 0x00010857) { if (yych <= 0x0001049F) goto yy2; if (yych <= 0x000104A9) goto yy4; } else { if (yych <= 0x0001085F) goto yy4; if (yych >= 0x00010916) goto yy4; } } } } else { if (yych <= 0x00010E7E) { if (yych <= 0x00010B57) { if (yych <= 0x00010A47) { if (yych >= 0x00010A40) goto yy4; } else { if (yych <= 0x00010A7C) goto yy2; if (yych <= 0x00010A7E) goto yy4; } } else { if (yych <= 0x00010B77) { if (yych <= 0x00010B5F) goto yy4; } else { if (yych <= 0x00010B7F) goto yy4; if (yych >= 0x00010E60) goto yy4; } } } else { if (yych <= 0x0001D35F) { if (yych <= 0x0001106F) { if (yych >= 0x00011052) goto yy4; } else { if (yych <= 0x000123FF) goto yy2; if (yych <= 0x00012462) goto yy4; } } else { if (yych <= 0x0001D7FF) { if (yych <= 0x0001D371) goto yy4; if (yych >= 0x0001D7CE) goto yy4; } else { if (yych <= 0x0001F0FF) goto yy2; if (yych <= 0x0001F10A) goto yy4; } } } } } } yy2: ++YYCURSOR; #line 13 "unicode_group_N.u--encoding-policy(fail).re" { return YYCURSOR == limit; } #line 311 "unicode_group_N.u--encoding-policy(fail).c" yy4: ++YYCURSOR; #line 12 "unicode_group_N.u--encoding-policy(fail).re" { goto N; } #line 316 "unicode_group_N.u--encoding-policy(fail).c" } #line 14 "unicode_group_N.u--encoding-policy(fail).re" } static const unsigned int chars_N [] = {0x30,0x39, 0xb2,0xb3, 0xb9,0xb9, 0xbc,0xbe, 0x660,0x669, 0x6f0,0x6f9, 0x7c0,0x7c9, 0x966,0x96f, 0x9e6,0x9ef, 0x9f4,0x9f9, 0xa66,0xa6f, 0xae6,0xaef, 0xb66,0xb6f, 0xb72,0xb77, 0xbe6,0xbf2, 0xc66,0xc6f, 0xc78,0xc7e, 0xce6,0xcef, 0xd66,0xd75, 0xe50,0xe59, 0xed0,0xed9, 0xf20,0xf33, 0x1040,0x1049, 0x1090,0x1099, 0x1369,0x137c, 0x16ee,0x16f0, 0x17e0,0x17e9, 0x17f0,0x17f9, 0x1810,0x1819, 0x1946,0x194f, 0x19d0,0x19da, 0x1a80,0x1a89, 0x1a90,0x1a99, 0x1b50,0x1b59, 0x1bb0,0x1bb9, 0x1c40,0x1c49, 0x1c50,0x1c59, 0x2070,0x2070, 0x2074,0x2079, 0x2080,0x2089, 0x2150,0x2182, 0x2185,0x2189, 0x2460,0x249b, 0x24ea,0x24ff, 0x2776,0x2793, 0x2cfd,0x2cfd, 0x3007,0x3007, 0x3021,0x3029, 0x3038,0x303a, 0x3192,0x3195, 0x3220,0x3229, 0x3251,0x325f, 0x3280,0x3289, 0x32b1,0x32bf, 0xa620,0xa629, 0xa6e6,0xa6ef, 0xa830,0xa835, 0xa8d0,0xa8d9, 0xa900,0xa909, 0xa9d0,0xa9d9, 0xaa50,0xaa59, 0xabf0,0xabf9, 0xff10,0xff19, 0x10107,0x10133, 0x10140,0x10178, 0x1018a,0x1018a, 0x10320,0x10323, 0x10341,0x10341, 0x1034a,0x1034a, 0x103d1,0x103d5, 0x104a0,0x104a9, 0x10858,0x1085f, 0x10916,0x1091b, 0x10a40,0x10a47, 0x10a7d,0x10a7e, 0x10b58,0x10b5f, 0x10b78,0x10b7f, 0x10e60,0x10e7e, 0x11052,0x1106f, 0x12400,0x12462, 0x1d360,0x1d371, 0x1d7ce,0x1d7ff, 0x1f100,0x1f10a, 0x0,0x0}; static unsigned int encode_utf32 (const unsigned int * ranges, unsigned int ranges_count, unsigned int * s) { unsigned int * const s_start = s; for (unsigned int i = 0; i < ranges_count; i += 2) for (unsigned int j = ranges[i]; j <= ranges[i + 1]; ++j) *s++ = j; return s - s_start; } int main () { YYCTYPE * buffer_N = new YYCTYPE [1101]; unsigned int buffer_len = encode_utf32 (chars_N, sizeof (chars_N) / sizeof (unsigned int), buffer_N); if (!scan (reinterpret_cast (buffer_N), reinterpret_cast (buffer_N + buffer_len))) printf("test 'N' failed\n"); delete [] buffer_N; return 0; }