/* Generated by re2c */
#line 1 "encodings/unicode_group_Pd_x.re"
// re2c $INPUT -o $OUTPUT -x
#include <stdint.h>
#include <stdio.h>
#include "utf16.h"
#define YYCTYPE uint16_t

bool scan(const YYCTYPE* start, const YYCTYPE* const limit) {
	__attribute__((unused)) const YYCTYPE* YYMARKER;
#define YYCURSOR start
Pd:

#line 15 "encodings/unicode_group_Pd_x.c"
{
	YYCTYPE yych;
	yych = *YYCURSOR;
	if (yych <= 0x2E3F) {
		if (yych <= 0x1805) {
			if (yych <= 0x058A) {
				if (yych == '-') goto yy3;
				if (yych >= 0x058A) goto yy3;
			} else {
				if (yych <= 0x05BE) {
					if (yych >= 0x05BE) goto yy3;
				} else {
					if (yych == 0x1400) goto yy3;
				}
			}
		} else {
			if (yych <= 0x2E17) {
				if (yych <= 0x200F) {
					if (yych <= 0x1806) goto yy3;
				} else {
					if (yych <= 0x2015) goto yy3;
					if (yych >= 0x2E17) goto yy3;
				}
			} else {
				if (yych <= 0x2E1A) {
					if (yych >= 0x2E1A) goto yy3;
				} else {
					if (yych <= 0x2E39) goto yy1;
					if (yych <= 0x2E3B) goto yy3;
				}
			}
		}
	} else {
		if (yych <= 0xD802) {
			if (yych <= 0x301C) {
				if (yych <= 0x2E5C) {
					if (yych <= 0x2E40) goto yy3;
				} else {
					if (yych <= 0x2E5D) goto yy3;
					if (yych >= 0x301C) goto yy3;
				}
			} else {
				if (yych <= 0x3030) {
					if (yych >= 0x3030) goto yy3;
				} else {
					if (yych == 0x30A0) goto yy3;
				}
			}
		} else {
			if (yych <= 0xFE58) {
				if (yych <= 0xFE30) {
					if (yych <= 0xD803) goto yy4;
				} else {
					if (yych <= 0xFE32) goto yy3;
					if (yych >= 0xFE58) goto yy3;
				}
			} else {
				if (yych <= 0xFE63) {
					if (yych >= 0xFE63) goto yy3;
				} else {
					if (yych == 0xFF0D) goto yy3;
				}
			}
		}
	}
yy1:
	++YYCURSOR;
yy2:
#line 15 "encodings/unicode_group_Pd_x.re"
	{ return YYCURSOR - 1 == limit; }
#line 86 "encodings/unicode_group_Pd_x.c"
yy3:
	++YYCURSOR;
#line 14 "encodings/unicode_group_Pd_x.re"
	{ goto Pd; }
#line 91 "encodings/unicode_group_Pd_x.c"
yy4:
	yych = *++YYCURSOR;
	if (yych == 0xDD6E) goto yy3;
	if (yych == 0xDEAD) goto yy3;
	goto yy2;
}
#line 16 "encodings/unicode_group_Pd_x.re"

}

static const uint32_t chars_Pd[] = {0x2d,0x2d,0x58a,0x58a,0x5be,0x5be,0x1400,0x1400,0x1806,0x1806,0x2010,0x2015,0x2e17,0x2e17,0x2e1a,0x2e1a,0x2e3a,0x2e3b,0x2e40,0x2e40,0x2e5d,0x2e5d,0x301c,0x301c,0x3030,0x3030,0x30a0,0x30a0,0xfe31,0xfe32,0xfe58,0xfe58,0xfe63,0xfe63,0xff0d,0xff0d,0x10d6e,0x10d6e,0x10ead,0x10ead,};

static uint32_t encode_utf16(const uint32_t* ranges, uint32_t ranges_count, uint16_t* s) {
	uint16_t* const s0 = s;
	for (uint32_t i = 0; i < ranges_count; i += 2)
		for (uint32_t 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);
			}
	for (uint32_t i = 0; i < 2; ++i) s[i] = 0;
	return s - s0;
}

int main() {
	YYCTYPE* buffer_Pd = new YYCTYPE[56];
	uint32_t buffer_Pd_len = encode_utf16(chars_Pd, sizeof(chars_Pd) / sizeof(uint32_t), buffer_Pd);
	if (!scan(buffer_Pd, buffer_Pd + buffer_Pd_len)) printf("test 'Pd' failed\n");
	delete[] buffer_Pd;
	return 0;
}
