/* Generated by re2c 4.4 */
/*
  +----------------------------------------------------------------------+
  | Copyright © The PHP Group and Contributors.                          |
  +----------------------------------------------------------------------+
  | This source file is subject to the Modified BSD License that is      |
  | bundled with this package in the file LICENSE, and is available      |
  | through the World Wide Web at <https://www.php.net/license/>.        |
  |                                                                      |
  | SPDX-License-Identifier: BSD-3-Clause                                |
  +----------------------------------------------------------------------+
  | Author: Jakub Zelenka <bukka@php.net>                                |
  +----------------------------------------------------------------------+
*/

#include "php.h"
#include "php_json_scanner.h"
#include "php_json_scanner_defs.h"
#include "php_json_parser.h"
#include "json_parser.tab.h"

#define	YYCTYPE     php_json_ctype
#define	YYCURSOR    s->cursor
#define	YYLIMIT     s->limit
#define	YYMARKER    s->marker
#define	YYCTXMARKER s->ctxmarker

#define YYGETCONDITION()        s->state
#define YYSETCONDITION(yystate) s->state = yystate

#define	YYFILL(n)

#define PHP_JSON_CONDITION_SET(condition) YYSETCONDITION(yyc##condition)
#define PHP_JSON_CONDITION_GOTO(condition) goto yyc_##condition
#define PHP_JSON_CONDITION_SET_AND_GOTO(condition) \
	PHP_JSON_CONDITION_SET(condition); \
	PHP_JSON_CONDITION_GOTO(condition)
#define PHP_JSON_CONDITION_GOTO_STR_P2() \
	do { \
		if (s->utf8_invalid) { \
			PHP_JSON_CONDITION_GOTO(STR_P2_BIN); \
		} else { \
			PHP_JSON_CONDITION_GOTO(STR_P2_UTF); \
		} \
	} while(0)


#define PHP_JSON_SCANNER_COPY_ESC() php_json_scanner_copy_string(s, 0)
#define PHP_JSON_SCANNER_COPY_UTF() php_json_scanner_copy_string(s, 5)
#define PHP_JSON_SCANNER_COPY_UTF_SP() php_json_scanner_copy_string(s, 11)

#define PHP_JSON_INT_MAX_LENGTH (MAX_LENGTH_OF_LONG - 1)

#define PHP_JSON_TOKEN_LENGTH() ((size_t) (s->cursor - s->token))
#define PHP_JSON_TOKEN_LOCATION(location) (s)->errloc.location

static void php_json_scanner_copy_string(php_json_scanner *s, size_t esc_size)
{
	size_t len = (size_t)(s->cursor - s->str_start - esc_size - 1);
	if (len) {
		memcpy(s->pstr, s->str_start, len);
		s->pstr += len;
	}
}

static int php_json_hex_to_int(unsigned char code)
{
	if (code >= '0' && code <= '9') {
		return code - '0';
	} else if (code >= 'A' && code <= 'F') {
		return code - ('A' - 10);
	} else if (code >= 'a' && code <= 'f') {
		return code - ('a' - 10);
	} else {
		/* this should never happened (just to suppress compiler warning) */
		return -1;
	}
}

static int php_json_ucs2_to_int_ex(php_json_scanner *s, int size, int start)
{
	int i, code = 0;
	php_json_ctype *pc = s->cursor - start;
	for (i = 0; i < size; i++) {
		code |= php_json_hex_to_int(*(pc--)) << (i * 4);
	}
	return code;
}

static int php_json_ucs2_to_int(php_json_scanner *s, int size)
{
	return php_json_ucs2_to_int_ex(s, size, 1);
}

void php_json_scanner_init(php_json_scanner *s, const char *str, size_t str_len, int options)
{
	s->cursor = (php_json_ctype *) str;
	s->limit = (php_json_ctype *) str + str_len;
	s->options = options;
	PHP_JSON_TOKEN_LOCATION(first_column) = 1;
	PHP_JSON_TOKEN_LOCATION(first_line) = 1;
	PHP_JSON_TOKEN_LOCATION(last_column) = 1;
	PHP_JSON_TOKEN_LOCATION(last_line) = 1;
	PHP_JSON_CONDITION_SET(JS);
}

int php_json_scan(php_json_scanner *s)
{
	ZVAL_NULL(&s->value);

std:
	PHP_JSON_TOKEN_LOCATION(first_column) = s->errloc.last_column;
	PHP_JSON_TOKEN_LOCATION(first_line) = s->errloc.last_line;
	s->token = s->cursor;


	{
		YYCTYPE yych;
		unsigned int yyaccept = 0;
		static const unsigned char yybm_JS[256] = {
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,  64,   0,   0,   0,  64,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			 64,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			128, 128, 128, 128, 128, 128, 128, 128,
			128, 128,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0,
			  0,   0,   0,   0,   0,   0,   0,   0
		};
		if (YYGETCONDITION() < 2) {
			if (YYGETCONDITION() < 1) goto yyc_JS;
			else goto yyc_STR_P1;
		} else {
			if (YYGETCONDITION() < 3) goto yyc_STR_P2_BIN;
			else goto yyc_STR_P2_UTF;
		}
/* *********************************** */
yyc_JS:
		yych = *YYCURSOR;
		if (yych <= ']') {
			if (yych <= '"') {
				if (yych <= '\f') {
					if (yych <= 0x08) {
						if (yych >= 0x01) goto yy1;
					} else {
						if (yych <= '\t') goto yy2;
						if (yych <= '\n') goto yy4;
						goto yy1;
					}
				} else {
					if (yych <= 0x1F) {
						if (yych <= '\r') goto yy5;
						goto yy1;
					} else {
						if (yych <= ' ') goto yy2;
						if (yych <= '!') goto yy6;
						goto yy8;
					}
				}
			} else {
				if (yych <= '0') {
					if (yych <= ',') {
						if (yych <= '+') goto yy6;
						goto yy9;
					} else {
						if (yych <= '-') goto yy10;
						if (yych <= '/') goto yy6;
						goto yy11;
					}
				} else {
					if (yych <= 'Z') {
						if (yych <= '9') goto yy13;
						if (yych <= ':') goto yy14;
						goto yy6;
					} else {
						if (yych <= '[') goto yy15;
						if (yych <= '\\') goto yy6;
						goto yy16;
					}
				}
			}
		} else {
			if (yych <= '}') {
				if (yych <= 's') {
					if (yych <= 'f') {
						if (yych <= 'e') goto yy6;
						goto yy17;
					} else {
						if (yych == 'n') goto yy18;
						goto yy6;
					}
				} else {
					if (yych <= 'z') {
						if (yych <= 't') goto yy19;
						goto yy6;
					} else {
						if (yych <= '{') goto yy20;
						if (yych <= '|') goto yy6;
						goto yy21;
					}
				}
			} else {
				if (yych <= 0xEC) {
					if (yych <= 0xC1) {
						if (yych <= 0x7F) goto yy6;
						goto yy22;
					} else {
						if (yych <= 0xDF) goto yy24;
						if (yych <= 0xE0) goto yy25;
						goto yy26;
					}
				} else {
					if (yych <= 0xF0) {
						if (yych <= 0xED) goto yy27;
						if (yych <= 0xEF) goto yy26;
						goto yy28;
					} else {
						if (yych <= 0xF3) goto yy29;
						if (yych <= 0xF4) goto yy30;
						goto yy22;
					}
				}
			}
		}
		++YYCURSOR;
		{
		if (s->limit < s->cursor) {
			return PHP_JSON_T_EOI;
		} else {
			s->errcode = PHP_JSON_ERROR_CTRL_CHAR;
			return PHP_JSON_T_ERROR;
		}
	}
yy1:
		++YYCURSOR;
		{
		s->errcode = PHP_JSON_ERROR_CTRL_CHAR;
		return PHP_JSON_T_ERROR;
	}
yy2:
		yych = *++YYCURSOR;
yy3:
		if (yybm_JS[0+yych] & 64) goto yy2;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += PHP_JSON_TOKEN_LENGTH();
		goto std;
	}
yy4:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_line)++;
		PHP_JSON_TOKEN_LOCATION(last_column) = 1;
		goto std;
	}
yy5:
		yych = *++YYCURSOR;
		if (yych == '\n') goto yy4;
		goto yy3;
yy6:
		++YYCURSOR;
yy7:
		{
		s->errcode = PHP_JSON_ERROR_SYNTAX;
		return PHP_JSON_T_ERROR;
	}
yy8:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		s->str_start = s->cursor;
		s->str_esc = 0;
		s->utf8_invalid = 0;
		s->utf8_invalid_count = 0;
		PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1);
	}
yy9:
		++YYCURSOR;
		{ 
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		return ','; 
	}
yy10:
		yych = *++YYCURSOR;
		if (yych <= '/') goto yy7;
		if (yych <= '0') goto yy11;
		if (yych <= '9') goto yy13;
		goto yy7;
yy11:
		yyaccept = 0;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 'D') {
			if (yych == '.') goto yy31;
		} else {
			if (yych <= 'E') goto yy33;
			if (yych == 'e') goto yy33;
		}
yy12:
		{
		bool bigint = 0, negative = s->token[0] == '-';
		size_t digits = PHP_JSON_TOKEN_LENGTH();
		PHP_JSON_TOKEN_LOCATION(last_column) += digits;
		digits -= negative;
		if (digits >= PHP_JSON_INT_MAX_LENGTH) {
			if (digits == PHP_JSON_INT_MAX_LENGTH) {
				int cmp = strncmp((char *) (s->token + negative), LONG_MIN_DIGITS, PHP_JSON_INT_MAX_LENGTH);
				if (!(cmp < 0 || (cmp == 0 && negative))) {
					bigint = 1;
				}
			} else {
				bigint = 1;
			}
		}
		if (!bigint) {
			ZVAL_LONG(&s->value, ZEND_STRTOL((char *) s->token, NULL, 10));
			return PHP_JSON_T_INT;
		} else if (s->options & PHP_JSON_BIGINT_AS_STRING) {
			ZVAL_STRINGL(&s->value, (char *) s->token, (size_t)(s->cursor - s->token));
			return PHP_JSON_T_STRING;
		} else {
			ZVAL_DOUBLE(&s->value, zend_strtod((char *) s->token, NULL));
			return PHP_JSON_T_DOUBLE;
		}
	}
yy13:
		yyaccept = 0;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yybm_JS[0+yych] & 128) goto yy13;
		if (yych <= 'D') {
			if (yych == '.') goto yy31;
			goto yy12;
		} else {
			if (yych <= 'E') goto yy33;
			if (yych == 'e') goto yy33;
			goto yy12;
		}
yy14:
		++YYCURSOR;
		{ 
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		return ':'; 
	}
yy15:
		++YYCURSOR;
		{ 
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		return '['; 
	}
yy16:
		++YYCURSOR;
		{ 
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		return ']'; 
	}
yy17:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych == 'a') goto yy34;
		goto yy7;
yy18:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych == 'u') goto yy35;
		goto yy7;
yy19:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych == 'r') goto yy36;
		goto yy7;
yy20:
		++YYCURSOR;
		{ 
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		return '{'; 
	}
yy21:
		++YYCURSOR;
		{ 
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		return '}';
	}
yy22:
		++YYCURSOR;
yy23:
		{
		s->errcode = PHP_JSON_ERROR_UTF8;
		return PHP_JSON_T_ERROR;
	}
yy24:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy23;
		if (yych <= 0xBF) goto yy6;
		goto yy23;
yy25:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x9F) goto yy23;
		if (yych <= 0xBF) goto yy37;
		goto yy23;
yy26:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy23;
		if (yych <= 0xBF) goto yy37;
		goto yy23;
yy27:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy23;
		if (yych <= 0x9F) goto yy37;
		goto yy23;
yy28:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x8F) goto yy23;
		if (yych <= 0xBF) goto yy38;
		goto yy23;
yy29:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy23;
		if (yych <= 0xBF) goto yy38;
		goto yy23;
yy30:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy23;
		if (yych <= 0x8F) goto yy38;
		goto yy23;
yy31:
		yych = *++YYCURSOR;
		if (yych <= '/') goto yy32;
		if (yych <= '9') goto yy39;
yy32:
		YYCURSOR = YYMARKER;
		if (yyaccept <= 1) {
			if (yyaccept == 0) goto yy12;
			else goto yy7;
		} else {
			if (yyaccept == 2) goto yy23;
			else goto yy40;
		}
yy33:
		yych = *++YYCURSOR;
		if (yych <= ',') {
			if (yych == '+') goto yy41;
			goto yy32;
		} else {
			if (yych <= '-') goto yy41;
			if (yych <= '/') goto yy32;
			if (yych <= '9') goto yy42;
			goto yy32;
		}
yy34:
		yych = *++YYCURSOR;
		if (yych == 'l') goto yy43;
		goto yy32;
yy35:
		yych = *++YYCURSOR;
		if (yych == 'l') goto yy44;
		goto yy32;
yy36:
		yych = *++YYCURSOR;
		if (yych == 'u') goto yy45;
		goto yy32;
yy37:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy32;
		if (yych <= 0xBF) goto yy6;
		goto yy32;
yy38:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy32;
		if (yych <= 0xBF) goto yy37;
		goto yy32;
yy39:
		yyaccept = 3;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 'D') {
			if (yych <= '/') goto yy40;
			if (yych <= '9') goto yy39;
		} else {
			if (yych <= 'E') goto yy33;
			if (yych == 'e') goto yy33;
		}
yy40:
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += PHP_JSON_TOKEN_LENGTH();
		ZVAL_DOUBLE(&s->value, zend_strtod((char *) s->token, NULL));
		return PHP_JSON_T_DOUBLE;
	}
yy41:
		yych = *++YYCURSOR;
		if (yych <= '/') goto yy32;
		if (yych >= ':') goto yy32;
yy42:
		yych = *++YYCURSOR;
		if (yych <= '/') goto yy40;
		if (yych <= '9') goto yy42;
		goto yy40;
yy43:
		yych = *++YYCURSOR;
		if (yych == 's') goto yy46;
		goto yy32;
yy44:
		yych = *++YYCURSOR;
		if (yych == 'l') goto yy47;
		goto yy32;
yy45:
		yych = *++YYCURSOR;
		if (yych == 'e') goto yy48;
		goto yy32;
yy46:
		yych = *++YYCURSOR;
		if (yych == 'e') goto yy49;
		goto yy32;
yy47:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 4;
		ZVAL_NULL(&s->value);
		return PHP_JSON_T_NUL;
	}
yy48:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 4;
		ZVAL_TRUE(&s->value);
		return PHP_JSON_T_TRUE;
	}
yy49:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 5;
		ZVAL_FALSE(&s->value);
		return PHP_JSON_T_FALSE;
	}
/* *********************************** */
yyc_STR_P1:
		yych = *YYCURSOR;
		if (yych <= 0xDF) {
			if (yych <= '[') {
				if (yych <= 0x1F) goto yy51;
				if (yych == '"') goto yy53;
				goto yy52;
			} else {
				if (yych <= '\\') goto yy54;
				if (yych <= 0x7F) goto yy52;
				if (yych <= 0xC1) goto yy56;
				goto yy58;
			}
		} else {
			if (yych <= 0xEF) {
				if (yych <= 0xE0) goto yy59;
				if (yych == 0xED) goto yy61;
				goto yy60;
			} else {
				if (yych <= 0xF0) goto yy62;
				if (yych <= 0xF3) goto yy63;
				if (yych <= 0xF4) goto yy64;
				goto yy56;
			}
		}
yy51:
		++YYCURSOR;
		{
		s->errcode = PHP_JSON_ERROR_CTRL_CHAR;
		return PHP_JSON_T_ERROR;
	}
yy52:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy53:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column)++;
		zend_string *str;
		size_t len = (size_t)(s->cursor - s->str_start - s->str_esc - 1 + s->utf8_invalid_count);
		if (len == 0) {
			PHP_JSON_CONDITION_SET(JS);
			ZVAL_EMPTY_STRING(&s->value);
			return PHP_JSON_T_ESTRING;
		}
		str = zend_string_alloc(len, 0);
		ZSTR_VAL(str)[len] = '\0';
		ZVAL_STR(&s->value, str);
		if (s->str_esc || s->utf8_invalid) {
			s->pstr = (php_json_ctype *) Z_STRVAL(s->value);
			s->cursor = s->str_start;
			PHP_JSON_CONDITION_GOTO_STR_P2();
		} else {
			memcpy(Z_STRVAL(s->value), s->str_start, len);
			PHP_JSON_CONDITION_SET(JS);
			return PHP_JSON_T_STRING;
		}
	}
yy54:
		yyaccept = 0;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 'e') {
			if (yych <= '/') {
				if (yych == '"') goto yy65;
				if (yych >= '/') goto yy65;
			} else {
				if (yych <= '\\') {
					if (yych >= '\\') goto yy65;
				} else {
					if (yych == 'b') goto yy65;
				}
			}
		} else {
			if (yych <= 'q') {
				if (yych <= 'f') goto yy65;
				if (yych == 'n') goto yy65;
			} else {
				if (yych <= 's') {
					if (yych <= 'r') goto yy65;
				} else {
					if (yych <= 't') goto yy65;
					if (yych <= 'u') goto yy66;
				}
			}
		}
yy55:
		{
		s->errcode = PHP_JSON_ERROR_SYNTAX;
		return PHP_JSON_T_ERROR;
	}
yy56:
		++YYCURSOR;
yy57:
		{
		if (s->options & (PHP_JSON_INVALID_UTF8_IGNORE | PHP_JSON_INVALID_UTF8_SUBSTITUTE)) {
			if (s->options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) {
				if (s->utf8_invalid_count > INT_MAX - 2) {
					s->errcode = PHP_JSON_ERROR_UTF8;
					return PHP_JSON_T_ERROR;
				}
				s->utf8_invalid_count += 2;
			} else {
				s->utf8_invalid_count--;
			}
			s->utf8_invalid = 1;
			PHP_JSON_CONDITION_GOTO(STR_P1);
		}
		s->errcode = PHP_JSON_ERROR_UTF8;
		return PHP_JSON_T_ERROR;
	}
yy58:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy57;
		if (yych <= 0xBF) goto yy68;
		goto yy57;
yy59:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x9F) goto yy57;
		if (yych <= 0xBF) goto yy69;
		goto yy57;
yy60:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy57;
		if (yych <= 0xBF) goto yy69;
		goto yy57;
yy61:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy57;
		if (yych <= 0x9F) goto yy69;
		goto yy57;
yy62:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x8F) goto yy57;
		if (yych <= 0xBF) goto yy70;
		goto yy57;
yy63:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy57;
		if (yych <= 0xBF) goto yy70;
		goto yy57;
yy64:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy57;
		if (yych <= 0x8F) goto yy70;
		goto yy57;
yy65:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 2;
		s->str_esc++;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy66:
		yych = *++YYCURSOR;
		if (yych <= 'D') {
			if (yych <= '9') {
				if (yych <= '/') goto yy67;
				if (yych <= '0') goto yy71;
				goto yy72;
			} else {
				if (yych <= '@') goto yy67;
				if (yych <= 'C') goto yy72;
				goto yy73;
			}
		} else {
			if (yych <= 'c') {
				if (yych <= 'F') goto yy72;
				if (yych >= 'a') goto yy72;
			} else {
				if (yych <= 'd') goto yy73;
				if (yych <= 'f') goto yy72;
			}
		}
yy67:
		YYCURSOR = YYMARKER;
		if (yyaccept <= 1) {
			if (yyaccept == 0) goto yy55;
			else goto yy57;
		} else {
			goto yy91;
		}
yy68:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy69:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy67;
		if (yych <= 0xBF) goto yy74;
		goto yy67;
yy70:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy67;
		if (yych <= 0xBF) goto yy75;
		goto yy67;
yy71:
		yych = *++YYCURSOR;
		if (yych <= '9') {
			if (yych <= '/') goto yy67;
			if (yych <= '0') goto yy76;
			if (yych <= '7') goto yy77;
			goto yy78;
		} else {
			if (yych <= 'F') {
				if (yych <= '@') goto yy67;
				goto yy78;
			} else {
				if (yych <= '`') goto yy67;
				if (yych <= 'f') goto yy78;
				goto yy67;
			}
		}
yy72:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy78;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy78;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy78;
			goto yy67;
		}
yy73:
		yych = *++YYCURSOR;
		if (yych <= 'B') {
			if (yych <= '7') {
				if (yych <= '/') goto yy67;
				goto yy78;
			} else {
				if (yych <= '9') goto yy79;
				if (yych <= '@') goto yy67;
				goto yy79;
			}
		} else {
			if (yych <= '`') {
				if (yych <= 'F') goto yy80;
				goto yy67;
			} else {
				if (yych <= 'b') goto yy79;
				if (yych <= 'f') goto yy80;
				goto yy67;
			}
		}
yy74:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy75:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy67;
		if (yych <= 0xBF) goto yy81;
		goto yy67;
yy76:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '7') goto yy82;
			if (yych <= '9') goto yy83;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy83;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy83;
			goto yy67;
		}
yy77:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy83;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy83;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy83;
			goto yy67;
		}
yy78:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy84;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy84;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy84;
			goto yy67;
		}
yy79:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy85;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy85;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy85;
			goto yy67;
		}
yy80:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy86;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy86;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy86;
			goto yy67;
		}
yy81:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy82:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy87;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy87;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy87;
			goto yy67;
		}
yy83:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy88;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy88;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy88;
			goto yy67;
		}
yy84:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy89;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy89;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy89;
			goto yy67;
		}
yy85:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy90;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy90;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy90;
			goto yy67;
		}
yy86:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych <= '9') goto yy92;
			goto yy67;
		} else {
			if (yych <= 'F') goto yy92;
			if (yych <= '`') goto yy67;
			if (yych <= 'f') goto yy92;
			goto yy67;
		}
yy87:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		s->str_esc += 5;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy88:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		s->str_esc += 4;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy89:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		s->str_esc += 3;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
yy90:
		yyaccept = 2;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych == '\\') goto yy93;
yy91:
		{
		s->errcode = PHP_JSON_ERROR_UTF16;
		return PHP_JSON_T_ERROR;
	}
yy92:
		++YYCURSOR;
		goto yy91;
yy93:
		yych = *++YYCURSOR;
		if (yych != 'u') goto yy67;
		yych = *++YYCURSOR;
		if (yych == 'D') goto yy94;
		if (yych != 'd') goto yy67;
yy94:
		yych = *++YYCURSOR;
		if (yych <= 'B') goto yy67;
		if (yych <= 'F') goto yy95;
		if (yych <= 'b') goto yy67;
		if (yych >= 'g') goto yy67;
yy95:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych >= ':') goto yy67;
		} else {
			if (yych <= 'F') goto yy96;
			if (yych <= '`') goto yy67;
			if (yych >= 'g') goto yy67;
		}
yy96:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy67;
			if (yych >= ':') goto yy67;
		} else {
			if (yych <= 'F') goto yy97;
			if (yych <= '`') goto yy67;
			if (yych >= 'g') goto yy67;
		}
yy97:
		++YYCURSOR;
		{
		PHP_JSON_TOKEN_LOCATION(last_column) += 1;
		s->str_esc += 8;
		PHP_JSON_CONDITION_GOTO(STR_P1);
	}
/* *********************************** */
yyc_STR_P2_BIN:
		yych = *YYCURSOR;
		if (yych <= 0xDF) {
			if (yych <= '[') {
				if (yych == '"') goto yy100;
			} else {
				if (yych <= '\\') goto yy101;
				if (yych <= 0x7F) goto yy99;
				if (yych <= 0xC1) goto yy103;
				goto yy105;
			}
		} else {
			if (yych <= 0xEF) {
				if (yych <= 0xE0) goto yy106;
				if (yych == 0xED) goto yy108;
				goto yy107;
			} else {
				if (yych <= 0xF0) goto yy109;
				if (yych <= 0xF3) goto yy110;
				if (yych <= 0xF4) goto yy111;
				goto yy103;
			}
		}
yy99:
		++YYCURSOR;
		{ PHP_JSON_CONDITION_GOTO(STR_P2_BIN); }
yy100:
		++YYCURSOR;
		YYSETCONDITION(yycJS);
		{
		PHP_JSON_SCANNER_COPY_ESC();
		return PHP_JSON_T_STRING;
	}
yy101:
		yyaccept = 0;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych == 'u') goto yy112;
yy102:
		{
		unsigned char esc;
		PHP_JSON_SCANNER_COPY_ESC();
		switch (*s->cursor) {
			case 'b':
				esc = '\b';
				break;
			case 'f':
				esc = '\f';				break;
			case 'n':
				esc = '\n';
				break;
			case 'r':
				esc = '\r';
				break;
			case 't':
				esc = '\t';
				break;
			case '\\':
			case '/':
			case '"':
				esc = *s->cursor;
				break;
			default:
				s->errcode = PHP_JSON_ERROR_SYNTAX;
				return PHP_JSON_T_ERROR;
		}
		*(s->pstr++) = esc;
		++YYCURSOR;
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy103:
		++YYCURSOR;
yy104:
		{
		if (s->utf8_invalid) {
			PHP_JSON_SCANNER_COPY_ESC();
			if (s->options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) {
				*(s->pstr++) = (unsigned char) (0xe0 | (0xfffd >> 12));
				*(s->pstr++) = (unsigned char) (0x80 | ((0xfffd >> 6) & 0x3f));
				*(s->pstr++) = (unsigned char) (0x80 | (0xfffd & 0x3f));
			}
			s->str_start = s->cursor;
		}
		PHP_JSON_CONDITION_GOTO(STR_P2_BIN);
	}
yy105:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy104;
		if (yych <= 0xBF) goto yy99;
		goto yy104;
yy106:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x9F) goto yy104;
		if (yych <= 0xBF) goto yy114;
		goto yy104;
yy107:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy104;
		if (yych <= 0xBF) goto yy114;
		goto yy104;
yy108:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy104;
		if (yych <= 0x9F) goto yy114;
		goto yy104;
yy109:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x8F) goto yy104;
		if (yych <= 0xBF) goto yy115;
		goto yy104;
yy110:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy104;
		if (yych <= 0xBF) goto yy115;
		goto yy104;
yy111:
		yyaccept = 1;
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych <= 0x7F) goto yy104;
		if (yych <= 0x8F) goto yy115;
		goto yy104;
yy112:
		yych = *++YYCURSOR;
		if (yych <= 'D') {
			if (yych <= '9') {
				if (yych <= '/') goto yy113;
				if (yych <= '0') goto yy116;
				goto yy117;
			} else {
				if (yych <= '@') goto yy113;
				if (yych <= 'C') goto yy117;
				goto yy118;
			}
		} else {
			if (yych <= 'c') {
				if (yych <= 'F') goto yy117;
				if (yych >= 'a') goto yy117;
			} else {
				if (yych <= 'd') goto yy118;
				if (yych <= 'f') goto yy117;
			}
		}
yy113:
		YYCURSOR = YYMARKER;
		if (yyaccept == 0) goto yy102;
		else goto yy104;
yy114:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy113;
		if (yych <= 0xBF) goto yy99;
		goto yy113;
yy115:
		yych = *++YYCURSOR;
		if (yych <= 0x7F) goto yy113;
		if (yych <= 0xBF) goto yy114;
		goto yy113;
yy116:
		yych = *++YYCURSOR;
		if (yych <= '9') {
			if (yych <= '/') goto yy113;
			if (yych <= '0') goto yy119;
			if (yych <= '7') goto yy120;
			goto yy121;
		} else {
			if (yych <= 'F') {
				if (yych <= '@') goto yy113;
				goto yy121;
			} else {
				if (yych <= '`') goto yy113;
				if (yych <= 'f') goto yy121;
				goto yy113;
			}
		}
yy117:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy121;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy121;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy121;
			goto yy113;
		}
yy118:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '7') goto yy121;
			if (yych <= '9') goto yy122;
			goto yy113;
		} else {
			if (yych <= 'B') goto yy122;
			if (yych <= '`') goto yy113;
			if (yych <= 'b') goto yy122;
			goto yy113;
		}
yy119:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '7') goto yy123;
			if (yych <= '9') goto yy124;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy124;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy124;
			goto yy113;
		}
yy120:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy124;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy124;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy124;
			goto yy113;
		}
yy121:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy125;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy125;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy125;
			goto yy113;
		}
yy122:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy126;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy126;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy126;
			goto yy113;
		}
yy123:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy127;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy127;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy127;
			goto yy113;
		}
yy124:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy128;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy128;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy128;
			goto yy113;
		}
yy125:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy129;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy129;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy129;
			goto yy113;
		}
yy126:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych <= '9') goto yy130;
			goto yy113;
		} else {
			if (yych <= 'F') goto yy130;
			if (yych <= '`') goto yy113;
			if (yych <= 'f') goto yy130;
			goto yy113;
		}
yy127:
		++YYCURSOR;
		{
		int utf16 = php_json_ucs2_to_int(s, 2);
		PHP_JSON_SCANNER_COPY_UTF();
		*(s->pstr++) = (unsigned char) utf16;
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy128:
		++YYCURSOR;
		{
		int utf16 = php_json_ucs2_to_int(s, 3);
		PHP_JSON_SCANNER_COPY_UTF();
		*(s->pstr++) = (unsigned char) (0xc0 | (utf16 >> 6));
		*(s->pstr++) = (unsigned char) (0x80 | (utf16 & 0x3f));
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy129:
		++YYCURSOR;
		{
		int utf16 = php_json_ucs2_to_int(s, 4);
		PHP_JSON_SCANNER_COPY_UTF();
		*(s->pstr++) = (unsigned char) (0xe0 | (utf16 >> 12));
		*(s->pstr++) = (unsigned char) (0x80 | ((utf16 >> 6) & 0x3f));
		*(s->pstr++) = (unsigned char) (0x80 | (utf16 & 0x3f));
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy130:
		yych = *++YYCURSOR;
		if (yych != '\\') goto yy113;
		yych = *++YYCURSOR;
		if (yych != 'u') goto yy113;
		yych = *++YYCURSOR;
		if (yych == 'D') goto yy131;
		if (yych != 'd') goto yy113;
yy131:
		yych = *++YYCURSOR;
		if (yych <= 'B') goto yy113;
		if (yych <= 'F') goto yy132;
		if (yych <= 'b') goto yy113;
		if (yych >= 'g') goto yy113;
yy132:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych >= ':') goto yy113;
		} else {
			if (yych <= 'F') goto yy133;
			if (yych <= '`') goto yy113;
			if (yych >= 'g') goto yy113;
		}
yy133:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy113;
			if (yych >= ':') goto yy113;
		} else {
			if (yych <= 'F') goto yy134;
			if (yych <= '`') goto yy113;
			if (yych >= 'g') goto yy113;
		}
yy134:
		++YYCURSOR;
		{
		int utf32, utf16_hi, utf16_lo;
		utf16_hi = php_json_ucs2_to_int(s, 4);
		utf16_lo = php_json_ucs2_to_int_ex(s, 4, 7);
		utf32 = ((utf16_lo & 0x3FF) << 10) + (utf16_hi & 0x3FF) + 0x10000;
		PHP_JSON_SCANNER_COPY_UTF_SP();
		*(s->pstr++) = (unsigned char) (0xf0 | (utf32 >> 18));
		*(s->pstr++) = (unsigned char) (0x80 | ((utf32 >> 12) & 0x3f));
		*(s->pstr++) = (unsigned char) (0x80 | ((utf32 >> 6) & 0x3f));
		*(s->pstr++) = (unsigned char) (0x80 | (utf32 & 0x3f));
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
/* *********************************** */
yyc_STR_P2_UTF:
		yych = *YYCURSOR;
		if (yych == '"') goto yy136;
		if (yych == '\\') goto yy137;
		++YYCURSOR;
		{ PHP_JSON_CONDITION_GOTO(STR_P2_UTF); }
yy136:
		++YYCURSOR;
		YYSETCONDITION(yycJS);
		{
		PHP_JSON_SCANNER_COPY_ESC();
		return PHP_JSON_T_STRING;
	}
yy137:
		yych = *(YYMARKER = ++YYCURSOR);
		if (yych == 'u') goto yy139;
yy138:
		{
		unsigned char esc;
		PHP_JSON_SCANNER_COPY_ESC();
		switch (*s->cursor) {
			case 'b':
				esc = '\b';
				break;
			case 'f':
				esc = '\f';				break;
			case 'n':
				esc = '\n';
				break;
			case 'r':
				esc = '\r';
				break;
			case 't':
				esc = '\t';
				break;
			case '\\':
			case '/':
			case '"':
				esc = *s->cursor;
				break;
			default:
				s->errcode = PHP_JSON_ERROR_SYNTAX;
				return PHP_JSON_T_ERROR;
		}
		*(s->pstr++) = esc;
		++YYCURSOR;
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy139:
		yych = *++YYCURSOR;
		if (yych <= 'D') {
			if (yych <= '9') {
				if (yych <= '/') goto yy140;
				if (yych <= '0') goto yy141;
				goto yy142;
			} else {
				if (yych <= '@') goto yy140;
				if (yych <= 'C') goto yy142;
				goto yy143;
			}
		} else {
			if (yych <= 'c') {
				if (yych <= 'F') goto yy142;
				if (yych >= 'a') goto yy142;
			} else {
				if (yych <= 'd') goto yy143;
				if (yych <= 'f') goto yy142;
			}
		}
yy140:
		YYCURSOR = YYMARKER;
		goto yy138;
yy141:
		yych = *++YYCURSOR;
		if (yych <= '9') {
			if (yych <= '/') goto yy140;
			if (yych <= '0') goto yy144;
			if (yych <= '7') goto yy145;
			goto yy146;
		} else {
			if (yych <= 'F') {
				if (yych <= '@') goto yy140;
				goto yy146;
			} else {
				if (yych <= '`') goto yy140;
				if (yych <= 'f') goto yy146;
				goto yy140;
			}
		}
yy142:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy146;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy146;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy146;
			goto yy140;
		}
yy143:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '7') goto yy146;
			if (yych <= '9') goto yy147;
			goto yy140;
		} else {
			if (yych <= 'B') goto yy147;
			if (yych <= '`') goto yy140;
			if (yych <= 'b') goto yy147;
			goto yy140;
		}
yy144:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '7') goto yy148;
			if (yych <= '9') goto yy149;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy149;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy149;
			goto yy140;
		}
yy145:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy149;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy149;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy149;
			goto yy140;
		}
yy146:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy150;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy150;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy150;
			goto yy140;
		}
yy147:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy151;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy151;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy151;
			goto yy140;
		}
yy148:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy152;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy152;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy152;
			goto yy140;
		}
yy149:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy153;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy153;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy153;
			goto yy140;
		}
yy150:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy154;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy154;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy154;
			goto yy140;
		}
yy151:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych <= '9') goto yy155;
			goto yy140;
		} else {
			if (yych <= 'F') goto yy155;
			if (yych <= '`') goto yy140;
			if (yych <= 'f') goto yy155;
			goto yy140;
		}
yy152:
		++YYCURSOR;
		{
		int utf16 = php_json_ucs2_to_int(s, 2);
		PHP_JSON_SCANNER_COPY_UTF();
		*(s->pstr++) = (unsigned char) utf16;
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy153:
		++YYCURSOR;
		{
		int utf16 = php_json_ucs2_to_int(s, 3);
		PHP_JSON_SCANNER_COPY_UTF();
		*(s->pstr++) = (unsigned char) (0xc0 | (utf16 >> 6));
		*(s->pstr++) = (unsigned char) (0x80 | (utf16 & 0x3f));
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy154:
		++YYCURSOR;
		{
		int utf16 = php_json_ucs2_to_int(s, 4);
		PHP_JSON_SCANNER_COPY_UTF();
		*(s->pstr++) = (unsigned char) (0xe0 | (utf16 >> 12));
		*(s->pstr++) = (unsigned char) (0x80 | ((utf16 >> 6) & 0x3f));
		*(s->pstr++) = (unsigned char) (0x80 | (utf16 & 0x3f));
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
yy155:
		yych = *++YYCURSOR;
		if (yych != '\\') goto yy140;
		yych = *++YYCURSOR;
		if (yych != 'u') goto yy140;
		yych = *++YYCURSOR;
		if (yych == 'D') goto yy156;
		if (yych != 'd') goto yy140;
yy156:
		yych = *++YYCURSOR;
		if (yych <= 'B') goto yy140;
		if (yych <= 'F') goto yy157;
		if (yych <= 'b') goto yy140;
		if (yych >= 'g') goto yy140;
yy157:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych >= ':') goto yy140;
		} else {
			if (yych <= 'F') goto yy158;
			if (yych <= '`') goto yy140;
			if (yych >= 'g') goto yy140;
		}
yy158:
		yych = *++YYCURSOR;
		if (yych <= '@') {
			if (yych <= '/') goto yy140;
			if (yych >= ':') goto yy140;
		} else {
			if (yych <= 'F') goto yy159;
			if (yych <= '`') goto yy140;
			if (yych >= 'g') goto yy140;
		}
yy159:
		++YYCURSOR;
		{
		int utf32, utf16_hi, utf16_lo;
		utf16_hi = php_json_ucs2_to_int(s, 4);
		utf16_lo = php_json_ucs2_to_int_ex(s, 4, 7);
		utf32 = ((utf16_lo & 0x3FF) << 10) + (utf16_hi & 0x3FF) + 0x10000;
		PHP_JSON_SCANNER_COPY_UTF_SP();
		*(s->pstr++) = (unsigned char) (0xf0 | (utf32 >> 18));
		*(s->pstr++) = (unsigned char) (0x80 | ((utf32 >> 12) & 0x3f));
		*(s->pstr++) = (unsigned char) (0x80 | ((utf32 >> 6) & 0x3f));
		*(s->pstr++) = (unsigned char) (0x80 | (utf32 & 0x3f));
		s->str_start = s->cursor;
		PHP_JSON_CONDITION_GOTO_STR_P2();
	}
	}


}
