/* Generated by re2c */ #line 1 "unicode_group_Pe.x--encoding-policy(ignore).re" #include #include "utf16.h" #define YYCTYPE unsigned short 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 Pe: #line 13 "unicode_group_Pe.x--encoding-policy(ignore).c" { YYCTYPE yych; yych = *YYCURSOR; if (yych <= 0x29D9) { if (yych <= 0x27C5) { if (yych <= 0x208D) { if (yych <= 0x0F3B) { if (yych <= ']') { if (yych == ')') goto yy4; if (yych >= ']') goto yy4; } else { if (yych == '}') goto yy4; if (yych >= 0x0F3B) goto yy4; } } else { if (yych <= 0x169C) { if (yych == 0x0F3D) goto yy4; if (yych >= 0x169C) goto yy4; } else { if (yych <= 0x2046) { if (yych >= 0x2046) goto yy4; } else { if (yych == 0x207E) goto yy4; } } } } else { if (yych <= 0x276D) { if (yych <= 0x2768) { if (yych <= 0x208E) goto yy4; if (yych == 0x232A) goto yy4; } else { if (yych <= 0x276A) { if (yych <= 0x2769) goto yy4; } else { if (yych != 0x276C) goto yy4; } } } else { if (yych <= 0x2771) { if (yych == 0x276F) goto yy4; if (yych >= 0x2771) goto yy4; } else { if (yych <= 0x2773) { if (yych >= 0x2773) goto yy4; } else { if (yych == 0x2775) goto yy4; } } } } } else { if (yych <= 0x2988) { if (yych <= 0x27EC) { if (yych <= 0x27E8) { if (yych <= 0x27C6) goto yy4; if (yych == 0x27E7) goto yy4; } else { if (yych == 0x27EA) goto yy2; if (yych <= 0x27EB) goto yy4; } } else { if (yych <= 0x2983) { if (yych == 0x27EE) goto yy2; if (yych <= 0x27EF) goto yy4; } else { if (yych <= 0x2985) { if (yych <= 0x2984) goto yy4; } else { if (yych != 0x2987) goto yy4; } } } } else { if (yych <= 0x2991) { if (yych <= 0x298C) { if (yych == 0x298A) goto yy4; if (yych >= 0x298C) goto yy4; } else { if (yych <= 0x298E) { if (yych >= 0x298E) goto yy4; } else { if (yych == 0x2990) goto yy4; } } } else { if (yych <= 0x2995) { if (yych == 0x2993) goto yy2; if (yych <= 0x2994) goto yy4; } else { if (yych <= 0x2997) { if (yych <= 0x2996) goto yy4; } else { if (yych <= 0x2998) goto yy4; if (yych >= 0x29D9) goto yy4; } } } } } } else { if (yych <= 0xFE17) { if (yych <= 0x300C) { if (yych <= 0x2E25) { if (yych <= 0x29FD) { if (yych == 0x29DB) goto yy4; if (yych >= 0x29FD) goto yy4; } else { if (yych == 0x2E23) goto yy4; if (yych >= 0x2E25) goto yy4; } } else { if (yych <= 0x2E29) { if (yych == 0x2E27) goto yy4; if (yych >= 0x2E29) goto yy4; } else { if (yych <= 0x3009) { if (yych >= 0x3009) goto yy4; } else { if (yych == 0x300B) goto yy4; } } } } else { if (yych <= 0x3017) { if (yych <= 0x3010) { if (yych == 0x300E) goto yy2; if (yych <= 0x300F) goto yy4; } else { if (yych <= 0x3014) { if (yych <= 0x3011) goto yy4; } else { if (yych != 0x3016) goto yy4; } } } else { if (yych <= 0x301B) { if (yych == 0x3019) goto yy4; if (yych >= 0x301B) goto yy4; } else { if (yych <= 0x301F) { if (yych >= 0x301E) goto yy4; } else { if (yych == 0xFD3F) goto yy4; } } } } } else { if (yych <= 0xFE47) { if (yych <= 0xFE3C) { if (yych <= 0xFE37) { if (yych <= 0xFE18) goto yy4; if (yych == 0xFE36) goto yy4; } else { if (yych <= 0xFE39) { if (yych <= 0xFE38) goto yy4; } else { if (yych != 0xFE3B) goto yy4; } } } else { if (yych <= 0xFE40) { if (yych == 0xFE3E) goto yy4; if (yych >= 0xFE40) goto yy4; } else { if (yych <= 0xFE42) { if (yych >= 0xFE42) goto yy4; } else { if (yych == 0xFE44) goto yy4; } } } } else { if (yych <= 0xFF09) { if (yych <= 0xFE5B) { if (yych <= 0xFE48) goto yy4; if (yych == 0xFE5A) goto yy4; } else { if (yych <= 0xFE5D) { if (yych <= 0xFE5C) goto yy4; } else { if (yych <= 0xFE5E) goto yy4; if (yych >= 0xFF09) goto yy4; } } } else { if (yych <= 0xFF5D) { if (yych == 0xFF3D) goto yy4; if (yych >= 0xFF5D) goto yy4; } else { if (yych <= 0xFF60) { if (yych >= 0xFF60) goto yy4; } else { if (yych == 0xFF63) goto yy4; } } } } } } yy2: ++YYCURSOR; #line 13 "unicode_group_Pe.x--encoding-policy(ignore).re" { return YYCURSOR == limit; } #line 219 "unicode_group_Pe.x--encoding-policy(ignore).c" yy4: ++YYCURSOR; #line 12 "unicode_group_Pe.x--encoding-policy(ignore).re" { goto Pe; } #line 224 "unicode_group_Pe.x--encoding-policy(ignore).c" } #line 14 "unicode_group_Pe.x--encoding-policy(ignore).re" } static const unsigned int chars_Pe [] = {0x29,0x29, 0x5d,0x5d, 0x7d,0x7d, 0xf3b,0xf3b, 0xf3d,0xf3d, 0x169c,0x169c, 0x2046,0x2046, 0x207e,0x207e, 0x208e,0x208e, 0x232a,0x232a, 0x2769,0x2769, 0x276b,0x276b, 0x276d,0x276d, 0x276f,0x276f, 0x2771,0x2771, 0x2773,0x2773, 0x2775,0x2775, 0x27c6,0x27c6, 0x27e7,0x27e7, 0x27e9,0x27e9, 0x27eb,0x27eb, 0x27ed,0x27ed, 0x27ef,0x27ef, 0x2984,0x2984, 0x2986,0x2986, 0x2988,0x2988, 0x298a,0x298a, 0x298c,0x298c, 0x298e,0x298e, 0x2990,0x2990, 0x2992,0x2992, 0x2994,0x2994, 0x2996,0x2996, 0x2998,0x2998, 0x29d9,0x29d9, 0x29db,0x29db, 0x29fd,0x29fd, 0x2e23,0x2e23, 0x2e25,0x2e25, 0x2e27,0x2e27, 0x2e29,0x2e29, 0x3009,0x3009, 0x300b,0x300b, 0x300d,0x300d, 0x300f,0x300f, 0x3011,0x3011, 0x3015,0x3015, 0x3017,0x3017, 0x3019,0x3019, 0x301b,0x301b, 0x301e,0x301f, 0xfd3f,0xfd3f, 0xfe18,0xfe18, 0xfe36,0xfe36, 0xfe38,0xfe38, 0xfe3a,0xfe3a, 0xfe3c,0xfe3c, 0xfe3e,0xfe3e, 0xfe40,0xfe40, 0xfe42,0xfe42, 0xfe44,0xfe44, 0xfe48,0xfe48, 0xfe5a,0xfe5a, 0xfe5c,0xfe5c, 0xfe5e,0xfe5e, 0xff09,0xff09, 0xff3d,0xff3d, 0xff5d,0xff5d, 0xff60,0xff60, 0xff63,0xff63, 0x0,0x0}; static unsigned int encode_utf16 (const unsigned int * ranges, unsigned int ranges_count, unsigned short * s) { unsigned short * 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) { if (j <= re2c::utf16::MAX_1WORD_RUNE) *s++ = j; else { *s++ = re2c::utf16::lead_surr(j); *s++ = re2c::utf16::trail_surr(j); } } return s - s_start; } int main () { YYCTYPE * buffer_Pe = new YYCTYPE [144]; unsigned int buffer_len = encode_utf16 (chars_Pe, sizeof (chars_Pe) / sizeof (unsigned int), buffer_Pe); if (!scan (reinterpret_cast (buffer_Pe), reinterpret_cast (buffer_Pe + buffer_len))) printf("test 'Pe' failed\n"); delete [] buffer_Pe; return 0; }