/* Generated by re2c */
#line 1 "encodings/unicode_group_Ps_8_encoding_policy_substitute.re"
// re2c $INPUT -o $OUTPUT -8 --encoding-policy substitute
#include <stdio.h>
#include "utf8.h"
#define YYCTYPE unsigned char
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
Ps:
	
#line 14 "encodings/unicode_group_Ps_8_encoding_policy_substitute.c"
{
	YYCTYPE yych;
	yych = *YYCURSOR;
	switch (yych) {
		case '(':
		case '[':
		case '{': goto yy3;
		case 0xE0: goto yy4;
		case 0xE1: goto yy5;
		case 0xE2: goto yy6;
		case 0xE3: goto yy7;
		case 0xEF: goto yy8;
		default: goto yy1;
	}
yy1:
	++YYCURSOR;
yy2:
#line 14 "encodings/unicode_group_Ps_8_encoding_policy_substitute.re"
	{ return YYCURSOR == limit; }
#line 34 "encodings/unicode_group_Ps_8_encoding_policy_substitute.c"
yy3:
	++YYCURSOR;
#line 13 "encodings/unicode_group_Ps_8_encoding_policy_substitute.re"
	{ goto Ps; }
#line 39 "encodings/unicode_group_Ps_8_encoding_policy_substitute.c"
yy4:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0xBC: goto yy9;
		default: goto yy2;
	}
yy5:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0x9A: goto yy11;
		default: goto yy2;
	}
yy6:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0x80: goto yy12;
		case 0x81: goto yy13;
		case 0x82: goto yy14;
		case 0x8C: goto yy15;
		case 0x9D: goto yy16;
		case 0x9F: goto yy17;
		case 0xA6: goto yy18;
		case 0xA7: goto yy19;
		case 0xB8: goto yy20;
		case 0xB9: goto yy21;
		default: goto yy2;
	}
yy7:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0x80: goto yy22;
		default: goto yy2;
	}
yy8:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0xB4: goto yy23;
		case 0xB8: goto yy24;
		case 0xB9: goto yy25;
		case 0xBC: goto yy26;
		case 0xBD: goto yy27;
		default: goto yy2;
	}
yy9:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xBA:
		case 0xBC: goto yy3;
		default: goto yy10;
	}
yy10:
	YYCURSOR = YYMARKER;
	goto yy2;
yy11:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9B: goto yy3;
		default: goto yy10;
	}
yy12:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9A:
		case 0x9E: goto yy3;
		default: goto yy10;
	}
yy13:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x85:
		case 0xBD: goto yy3;
		default: goto yy10;
	}
yy14:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x8D: goto yy3;
		default: goto yy10;
	}
yy15:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x88:
		case 0x8A:
		case 0xA9: goto yy3;
		default: goto yy10;
	}
yy16:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xA8:
		case 0xAA:
		case 0xAC:
		case 0xAE:
		case 0xB0:
		case 0xB2:
		case 0xB4: goto yy3;
		default: goto yy10;
	}
yy17:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x85:
		case 0xA6:
		case 0xA8:
		case 0xAA:
		case 0xAC:
		case 0xAE: goto yy3;
		default: goto yy10;
	}
yy18:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x83:
		case 0x85:
		case 0x87:
		case 0x89:
		case 0x8B:
		case 0x8D:
		case 0x8F:
		case 0x91:
		case 0x93:
		case 0x95:
		case 0x97: goto yy3;
		default: goto yy10;
	}
yy19:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x98:
		case 0x9A:
		case 0xBC: goto yy3;
		default: goto yy10;
	}
yy20:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xA2:
		case 0xA4:
		case 0xA6:
		case 0xA8: goto yy3;
		default: goto yy10;
	}
yy21:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x82: goto yy3;
		default: goto yy10;
	}
yy22:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x88:
		case 0x8A:
		case 0x8C:
		case 0x8E:
		case 0x90:
		case 0x94:
		case 0x96:
		case 0x98:
		case 0x9A:
		case 0x9D: goto yy3;
		default: goto yy10;
	}
yy23:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xBF: goto yy3;
		default: goto yy10;
	}
yy24:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x97:
		case 0xB5:
		case 0xB7:
		case 0xB9:
		case 0xBB:
		case 0xBD:
		case 0xBF: goto yy3;
		default: goto yy10;
	}
yy25:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x81:
		case 0x83:
		case 0x87:
		case 0x99:
		case 0x9B:
		case 0x9D: goto yy3;
		default: goto yy10;
	}
yy26:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x88:
		case 0xBB: goto yy3;
		default: goto yy10;
	}
yy27:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9B:
		case 0x9F:
		case 0xA2: goto yy3;
		default: goto yy10;
	}
}
#line 15 "encodings/unicode_group_Ps_8_encoding_policy_substitute.re"

}
static const unsigned int chars_Ps [] = {0x28,0x28,  0x5b,0x5b,  0x7b,0x7b,  0xf3a,0xf3a,  0xf3c,0xf3c,  0x169b,0x169b,  0x201a,0x201a,  0x201e,0x201e,  0x2045,0x2045,  0x207d,0x207d,  0x208d,0x208d,  0x2308,0x2308,  0x230a,0x230a,  0x2329,0x2329,  0x2768,0x2768,  0x276a,0x276a,  0x276c,0x276c,  0x276e,0x276e,  0x2770,0x2770,  0x2772,0x2772,  0x2774,0x2774,  0x27c5,0x27c5,  0x27e6,0x27e6,  0x27e8,0x27e8,  0x27ea,0x27ea,  0x27ec,0x27ec,  0x27ee,0x27ee,  0x2983,0x2983,  0x2985,0x2985,  0x2987,0x2987,  0x2989,0x2989,  0x298b,0x298b,  0x298d,0x298d,  0x298f,0x298f,  0x2991,0x2991,  0x2993,0x2993,  0x2995,0x2995,  0x2997,0x2997,  0x29d8,0x29d8,  0x29da,0x29da,  0x29fc,0x29fc,  0x2e22,0x2e22,  0x2e24,0x2e24,  0x2e26,0x2e26,  0x2e28,0x2e28,  0x2e42,0x2e42,  0x3008,0x3008,  0x300a,0x300a,  0x300c,0x300c,  0x300e,0x300e,  0x3010,0x3010,  0x3014,0x3014,  0x3016,0x3016,  0x3018,0x3018,  0x301a,0x301a,  0x301d,0x301d,  0xfd3f,0xfd3f,  0xfe17,0xfe17,  0xfe35,0xfe35,  0xfe37,0xfe37,  0xfe39,0xfe39,  0xfe3b,0xfe3b,  0xfe3d,0xfe3d,  0xfe3f,0xfe3f,  0xfe41,0xfe41,  0xfe43,0xfe43,  0xfe47,0xfe47,  0xfe59,0xfe59,  0xfe5b,0xfe5b,  0xfe5d,0xfe5d,  0xff08,0xff08,  0xff3b,0xff3b,  0xff5b,0xff5b,  0xff5f,0xff5f,  0xff62,0xff62,  0x0,0x0};
static unsigned int encode_utf8 (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 - 2; i += 2)
		for (unsigned int j = ranges[i]; j <= ranges[i + 1]; ++j)
			s += re2c::utf8::rune_to_bytes (s, j);
	re2c::utf8::rune_to_bytes (s, ranges[ranges_count - 1]);
	return s - s_start + 1;
}

int main ()
{
	unsigned int * buffer_Ps = new unsigned int [304];
	YYCTYPE * s = (YYCTYPE *) buffer_Ps;
	unsigned int buffer_len = encode_utf8 (chars_Ps, sizeof (chars_Ps) / sizeof (unsigned int), buffer_Ps);
	/* convert 32-bit code units to YYCTYPE; reuse the same buffer */
	for (unsigned int i = 0; i < buffer_len; ++i) s[i] = buffer_Ps[i];
	if (!scan (s, s + buffer_len))
		printf("test 'Ps' failed\n");
	delete [] buffer_Ps;
	return 0;
}
