/* Generated by re2c */
#line 1 "encodings/unicode_group_Pi_x_encoding_policy_ignore.re"
// re2c $INPUT -o $OUTPUT -x --encoding-policy ignore
#include <stdio.h>
#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
Pi:
	
#line 14 "encodings/unicode_group_Pi_x_encoding_policy_ignore.c"
{
	YYCTYPE yych;
	yych = *YYCURSOR;
	if (yych <= 0x2E01) {
		if (yych <= 0x201A) {
			if (yych <= 0x00AB) {
				if (yych >= 0x00AB) goto yy1;
			} else {
				if (yych == 0x2018) goto yy1;
			}
		} else {
			if (yych <= 0x201F) {
				if (yych <= 0x201C) goto yy1;
				if (yych >= 0x201F) goto yy1;
			} else {
				if (yych == 0x2039) goto yy1;
			}
		}
	} else {
		if (yych <= 0x2E0B) {
			if (yych <= 0x2E04) {
				if (yych != 0x2E03) goto yy1;
			} else {
				if (yych == 0x2E09) goto yy1;
			}
		} else {
			if (yych <= 0x2E1C) {
				if (yych <= 0x2E0C) goto yy1;
				if (yych >= 0x2E1C) goto yy1;
			} else {
				if (yych == 0x2E20) goto yy1;
			}
		}
	}
	++YYCURSOR;
#line 14 "encodings/unicode_group_Pi_x_encoding_policy_ignore.re"
	{ return YYCURSOR == limit; }
#line 52 "encodings/unicode_group_Pi_x_encoding_policy_ignore.c"
yy1:
	++YYCURSOR;
#line 13 "encodings/unicode_group_Pi_x_encoding_policy_ignore.re"
	{ goto Pi; }
#line 57 "encodings/unicode_group_Pi_x_encoding_policy_ignore.c"
}
#line 15 "encodings/unicode_group_Pi_x_encoding_policy_ignore.re"

}
static const unsigned int chars_Pi [] = {0xab,0xab,  0x2018,0x2018,  0x201b,0x201c,  0x201f,0x201f,  0x2039,0x2039,  0x2e02,0x2e02,  0x2e04,0x2e04,  0x2e09,0x2e09,  0x2e0c,0x2e0c,  0x2e1c,0x2e1c,  0x2e20,0x2e20,  0x0,0x0};
static unsigned int encode_utf16 (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)
		{
			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 ()
{
	unsigned int * buffer_Pi = new unsigned int [26];
	YYCTYPE * s = (YYCTYPE *) buffer_Pi;
	unsigned int buffer_len = encode_utf16 (chars_Pi, sizeof (chars_Pi) / sizeof (unsigned int), buffer_Pi);
	/* convert 32-bit code units to YYCTYPE; reuse the same buffer */
	for (unsigned int i = 0; i < buffer_len; ++i) s[i] = buffer_Pi[i];
	if (!scan (s, s + buffer_len))
		printf("test 'Pi' failed\n");
	delete [] buffer_Pi;
	return 0;
}
