/* Generated by re2c */
#line 1 "encodings/unicode_group_Sm_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
Sm:
	
#line 14 "encodings/unicode_group_Sm_8_encoding_policy_substitute.c"
{
	YYCTYPE yych;
	yych = *YYCURSOR;
	switch (yych) {
		case '+':
		case '<':
		case '=':
		case '>':
		case '|':
		case '~': goto yy3;
		case 0xC2: goto yy4;
		case 0xC3: goto yy5;
		case 0xCF: goto yy6;
		case 0xD8: goto yy7;
		case 0xE2: goto yy8;
		case 0xEF: goto yy9;
		case 0xF0: goto yy10;
		default: goto yy1;
	}
yy1:
	++YYCURSOR;
yy2:
#line 14 "encodings/unicode_group_Sm_8_encoding_policy_substitute.re"
	{ return YYCURSOR == limit; }
#line 39 "encodings/unicode_group_Sm_8_encoding_policy_substitute.c"
yy3:
	++YYCURSOR;
#line 13 "encodings/unicode_group_Sm_8_encoding_policy_substitute.re"
	{ goto Sm; }
#line 44 "encodings/unicode_group_Sm_8_encoding_policy_substitute.c"
yy4:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xAC:
		case 0xB1: goto yy3;
		default: goto yy2;
	}
yy5:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x97:
		case 0xB7: goto yy3;
		default: goto yy2;
	}
yy6:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xB6: goto yy3;
		default: goto yy2;
	}
yy7:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x86:
		case 0x87:
		case 0x88: goto yy3;
		default: goto yy2;
	}
yy8:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0x81: goto yy11;
		case 0x82: goto yy13;
		case 0x84: goto yy14;
		case 0x85: goto yy15;
		case 0x86: goto yy16;
		case 0x87: goto yy17;
		case 0x88:
		case 0x89:
		case 0x8A:
		case 0x8B:
		case 0xA4:
		case 0xA5:
		case 0xA8:
		case 0xA9:
		case 0xAA:
		case 0xAB: goto yy18;
		case 0x8C: goto yy19;
		case 0x8D: goto yy20;
		case 0x8E: goto yy21;
		case 0x8F: goto yy22;
		case 0x96: goto yy23;
		case 0x97: goto yy24;
		case 0x99: goto yy25;
		case 0x9F: goto yy26;
		case 0xA6: goto yy27;
		case 0xA7: goto yy28;
		case 0xAC: goto yy29;
		case 0xAD: goto yy30;
		default: goto yy2;
	}
yy9:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0xAC: goto yy31;
		case 0xB9: goto yy32;
		case 0xBC: goto yy33;
		case 0xBD: goto yy34;
		case 0xBF: goto yy35;
		default: goto yy2;
	}
yy10:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 0x9D: goto yy36;
		case 0x9E: goto yy37;
		default: goto yy2;
	}
yy11:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x84:
		case 0x92:
		case 0xBA:
		case 0xBB:
		case 0xBC: goto yy3;
		default: goto yy12;
	}
yy12:
	YYCURSOR = YYMARKER;
	goto yy2;
yy13:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x8A:
		case 0x8B:
		case 0x8C: goto yy3;
		default: goto yy12;
	}
yy14:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x98: goto yy3;
		default: goto yy12;
	}
yy15:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x80:
		case 0x81:
		case 0x82:
		case 0x83:
		case 0x84:
		case 0x8B: goto yy3;
		default: goto yy12;
	}
yy16:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x90:
		case 0x91:
		case 0x92:
		case 0x93:
		case 0x94:
		case 0x9A:
		case 0x9B:
		case 0xA0:
		case 0xA3:
		case 0xA6:
		case 0xAE: goto yy3;
		default: goto yy12;
	}
yy17:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x8E:
		case 0x8F:
		case 0x92:
		case 0x94:
		case 0xB4:
		case 0xB5:
		case 0xB6:
		case 0xB7:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBC:
		case 0xBD:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy18:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x80:
		case 0x81:
		case 0x82:
		case 0x83:
		case 0x84:
		case 0x85:
		case 0x86:
		case 0x87:
		case 0x88:
		case 0x89:
		case 0x8A:
		case 0x8B:
		case 0x8C:
		case 0x8D:
		case 0x8E:
		case 0x8F:
		case 0x90:
		case 0x91:
		case 0x92:
		case 0x93:
		case 0x94:
		case 0x95:
		case 0x96:
		case 0x97:
		case 0x98:
		case 0x99:
		case 0x9A:
		case 0x9B:
		case 0x9C:
		case 0x9D:
		case 0x9E:
		case 0x9F:
		case 0xA0:
		case 0xA1:
		case 0xA2:
		case 0xA3:
		case 0xA4:
		case 0xA5:
		case 0xA6:
		case 0xA7:
		case 0xA8:
		case 0xA9:
		case 0xAA:
		case 0xAB:
		case 0xAC:
		case 0xAD:
		case 0xAE:
		case 0xAF:
		case 0xB0:
		case 0xB1:
		case 0xB2:
		case 0xB3:
		case 0xB4:
		case 0xB5:
		case 0xB6:
		case 0xB7:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBC:
		case 0xBD:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy19:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xA0:
		case 0xA1: goto yy3;
		default: goto yy12;
	}
yy20:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xBC: goto yy3;
		default: goto yy12;
	}
yy21:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9B:
		case 0x9C:
		case 0x9D:
		case 0x9E:
		case 0x9F:
		case 0xA0:
		case 0xA1:
		case 0xA2:
		case 0xA3:
		case 0xA4:
		case 0xA5:
		case 0xA6:
		case 0xA7:
		case 0xA8:
		case 0xA9:
		case 0xAA:
		case 0xAB:
		case 0xAC:
		case 0xAD:
		case 0xAE:
		case 0xAF:
		case 0xB0:
		case 0xB1:
		case 0xB2:
		case 0xB3: goto yy3;
		default: goto yy12;
	}
yy22:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9C:
		case 0x9D:
		case 0x9E:
		case 0x9F:
		case 0xA0:
		case 0xA1: goto yy3;
		default: goto yy12;
	}
yy23:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xB7: goto yy3;
		default: goto yy12;
	}
yy24:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x81:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBC:
		case 0xBD:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy25:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xAF: goto yy3;
		default: goto yy12;
	}
yy26:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x80:
		case 0x81:
		case 0x82:
		case 0x83:
		case 0x84:
		case 0x87:
		case 0x88:
		case 0x89:
		case 0x8A:
		case 0x8B:
		case 0x8C:
		case 0x8D:
		case 0x8E:
		case 0x8F:
		case 0x90:
		case 0x91:
		case 0x92:
		case 0x93:
		case 0x94:
		case 0x95:
		case 0x96:
		case 0x97:
		case 0x98:
		case 0x99:
		case 0x9A:
		case 0x9B:
		case 0x9C:
		case 0x9D:
		case 0x9E:
		case 0x9F:
		case 0xA0:
		case 0xA1:
		case 0xA2:
		case 0xA3:
		case 0xA4:
		case 0xA5:
		case 0xB0:
		case 0xB1:
		case 0xB2:
		case 0xB3:
		case 0xB4:
		case 0xB5:
		case 0xB6:
		case 0xB7:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBC:
		case 0xBD:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy27:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x80:
		case 0x81:
		case 0x82:
		case 0x99:
		case 0x9A:
		case 0x9B:
		case 0x9C:
		case 0x9D:
		case 0x9E:
		case 0x9F:
		case 0xA0:
		case 0xA1:
		case 0xA2:
		case 0xA3:
		case 0xA4:
		case 0xA5:
		case 0xA6:
		case 0xA7:
		case 0xA8:
		case 0xA9:
		case 0xAA:
		case 0xAB:
		case 0xAC:
		case 0xAD:
		case 0xAE:
		case 0xAF:
		case 0xB0:
		case 0xB1:
		case 0xB2:
		case 0xB3:
		case 0xB4:
		case 0xB5:
		case 0xB6:
		case 0xB7:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBC:
		case 0xBD:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy28:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x80:
		case 0x81:
		case 0x82:
		case 0x83:
		case 0x84:
		case 0x85:
		case 0x86:
		case 0x87:
		case 0x88:
		case 0x89:
		case 0x8A:
		case 0x8B:
		case 0x8C:
		case 0x8D:
		case 0x8E:
		case 0x8F:
		case 0x90:
		case 0x91:
		case 0x92:
		case 0x93:
		case 0x94:
		case 0x95:
		case 0x96:
		case 0x97:
		case 0x9C:
		case 0x9D:
		case 0x9E:
		case 0x9F:
		case 0xA0:
		case 0xA1:
		case 0xA2:
		case 0xA3:
		case 0xA4:
		case 0xA5:
		case 0xA6:
		case 0xA7:
		case 0xA8:
		case 0xA9:
		case 0xAA:
		case 0xAB:
		case 0xAC:
		case 0xAD:
		case 0xAE:
		case 0xAF:
		case 0xB0:
		case 0xB1:
		case 0xB2:
		case 0xB3:
		case 0xB4:
		case 0xB5:
		case 0xB6:
		case 0xB7:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy29:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xB0:
		case 0xB1:
		case 0xB2:
		case 0xB3:
		case 0xB4:
		case 0xB5:
		case 0xB6:
		case 0xB7:
		case 0xB8:
		case 0xB9:
		case 0xBA:
		case 0xBB:
		case 0xBC:
		case 0xBD:
		case 0xBE:
		case 0xBF: goto yy3;
		default: goto yy12;
	}
yy30:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x80:
		case 0x81:
		case 0x82:
		case 0x83:
		case 0x84:
		case 0x87:
		case 0x88:
		case 0x89:
		case 0x8A:
		case 0x8B:
		case 0x8C: goto yy3;
		default: goto yy12;
	}
yy31:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xA9: goto yy3;
		default: goto yy12;
	}
yy32:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xA2:
		case 0xA4:
		case 0xA5:
		case 0xA6: goto yy3;
		default: goto yy12;
	}
yy33:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x8B:
		case 0x9C:
		case 0x9D:
		case 0x9E: goto yy3;
		default: goto yy12;
	}
yy34:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9C:
		case 0x9E: goto yy3;
		default: goto yy12;
	}
yy35:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xA2:
		case 0xA9:
		case 0xAA:
		case 0xAB:
		case 0xAC: goto yy3;
		default: goto yy12;
	}
yy36:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x9B: goto yy38;
		case 0x9C: goto yy39;
		case 0x9D: goto yy40;
		case 0x9E: goto yy41;
		case 0x9F: goto yy42;
		default: goto yy12;
	}
yy37:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xBB: goto yy43;
		default: goto yy12;
	}
yy38:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x81:
		case 0x9B:
		case 0xBB: goto yy3;
		default: goto yy12;
	}
yy39:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x95:
		case 0xB5: goto yy3;
		default: goto yy12;
	}
yy40:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x8F:
		case 0xAF: goto yy3;
		default: goto yy12;
	}
yy41:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x89:
		case 0xA9: goto yy3;
		default: goto yy12;
	}
yy42:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x83: goto yy3;
		default: goto yy12;
	}
yy43:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0xB0:
		case 0xB1: goto yy3;
		default: goto yy12;
	}
}
#line 15 "encodings/unicode_group_Sm_8_encoding_policy_substitute.re"

}
static const unsigned int chars_Sm [] = {0x2b,0x2b,  0x3c,0x3e,  0x7c,0x7c,  0x7e,0x7e,  0xac,0xac,  0xb1,0xb1,  0xd7,0xd7,  0xf7,0xf7,  0x3f6,0x3f6,  0x606,0x608,  0x2044,0x2044,  0x2052,0x2052,  0x207a,0x207c,  0x208a,0x208c,  0x2118,0x2118,  0x2140,0x2144,  0x214b,0x214b,  0x2190,0x2194,  0x219a,0x219b,  0x21a0,0x21a0,  0x21a3,0x21a3,  0x21a6,0x21a6,  0x21ae,0x21ae,  0x21ce,0x21cf,  0x21d2,0x21d2,  0x21d4,0x21d4,  0x21f4,0x22ff,  0x2320,0x2321,  0x237c,0x237c,  0x239b,0x23b3,  0x23dc,0x23e1,  0x25b7,0x25b7,  0x25c1,0x25c1,  0x25f8,0x25ff,  0x266f,0x266f,  0x27c0,0x27c4,  0x27c7,0x27e5,  0x27f0,0x27ff,  0x2900,0x2982,  0x2999,0x29d7,  0x29dc,0x29fb,  0x29fe,0x2aff,  0x2b30,0x2b44,  0x2b47,0x2b4c,  0xfb29,0xfb29,  0xfe62,0xfe62,  0xfe64,0xfe66,  0xff0b,0xff0b,  0xff1c,0xff1e,  0xff5c,0xff5c,  0xff5e,0xff5e,  0xffe2,0xffe2,  0xffe9,0xffec,  0x1d6c1,0x1d6c1,  0x1d6db,0x1d6db,  0x1d6fb,0x1d6fb,  0x1d715,0x1d715,  0x1d735,0x1d735,  0x1d74f,0x1d74f,  0x1d76f,0x1d76f,  0x1d789,0x1d789,  0x1d7a9,0x1d7a9,  0x1d7c3,0x1d7c3,  0x1eef0,0x1eef1,  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_Sm = new unsigned int [3796];
	YYCTYPE * s = (YYCTYPE *) buffer_Sm;
	unsigned int buffer_len = encode_utf8 (chars_Sm, sizeof (chars_Sm) / sizeof (unsigned int), buffer_Sm);
	/* convert 32-bit code units to YYCTYPE; reuse the same buffer */
	for (unsigned int i = 0; i < buffer_len; ++i) s[i] = buffer_Sm[i];
	if (!scan (s, s + buffer_len))
		printf("test 'Sm' failed\n");
	delete [] buffer_Sm;
	return 0;
}
