uint32_t Scanner::lex_cls_chr()
{
    tok = cur;
    const loc_t &loc = cur_loc();
    #line 800 "../src/parse/lex.re"

    if (globopts->input_encoding == Enc::ASCII) {
        
#line 3871 "src/parse/lex.cc"
{
	unsigned char yych;
	unsigned int yyaccept = 0;
	if ((lim - cur) < 10) { if (!fill(10)) { error("unexpected end of input"); exit(1); } }
	yych = (unsigned char)*cur;
	if (yych <= '\f') {
		if (yych <= 0x00) goto yy427;
		if (yych == '\n') goto yy430;
		goto yy428;
	} else {
		if (yych <= '\r') goto yy431;
		if (yych == '\\') goto yy432;
		goto yy428;
	}
yy427:
	++cur;
#line 781 "../src/parse/lex.re"
	{ fail_if_eof(); return 0; }
#line 3890 "src/parse/lex.cc"
yy428:
	++cur;
yy429:
#line 783 "../src/parse/lex.re"
	{ return decode(tok); }
#line 3896 "src/parse/lex.cc"
yy430:
	++cur;
#line 775 "../src/parse/lex.re"
	{ msg.error(loc, "newline in character class"); exit(1); }
#line 3901 "src/parse/lex.cc"
yy431:
	yych = (unsigned char)*++cur;
	if (yych == '\n') goto yy430;
	goto yy429;
yy432:
	yych = (unsigned char)*++cur;
	if (yych <= '\\') {
		if (yych <= '/') {
			if (yych <= '\f') {
				if (yych <= 0x00) goto yy433;
				if (yych == '\n') goto yy430;
				goto yy434;
			} else {
				if (yych <= '\r') goto yy436;
				if (yych == '-') goto yy437;
				goto yy434;
			}
		} else {
			if (yych <= 'U') {
				if (yych <= '3') goto yy438;
				if (yych <= '7') goto yy440;
				if (yych <= 'T') goto yy434;
				goto yy441;
			} else {
				if (yych == 'X') goto yy443;
				if (yych <= '[') goto yy434;
				goto yy444;
			}
		}
	} else {
		if (yych <= 'n') {
			if (yych <= 'b') {
				if (yych <= ']') goto yy445;
				if (yych <= '`') goto yy434;
				if (yych <= 'a') goto yy446;
				goto yy447;
			} else {
				if (yych == 'f') goto yy448;
				if (yych <= 'm') goto yy434;
				goto yy449;
			}
		} else {
			if (yych <= 't') {
				if (yych == 'r') goto yy450;
				if (yych <= 's') goto yy434;
				goto yy451;
			} else {
				if (yych <= 'v') {
					if (yych <= 'u') goto yy443;
					goto yy452;
				} else {
					if (yych == 'x') goto yy453;
					goto yy434;
				}
			}
		}
	}
yy433:
#line 778 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error in escape sequence"); exit(1); }
#line 3962 "src/parse/lex.cc"
yy434:
	++cur;
yy435:
#line 796 "../src/parse/lex.re"
	{
        msg.warn.useless_escape(loc, tok, cur);
        return decode(tok + 1);
    }
#line 3971 "src/parse/lex.cc"
yy436:
	yych = (unsigned char)*++cur;
	if (yych == '\n') goto yy430;
	goto yy435;
yy437:
	++cur;
#line 794 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('-'); }
#line 3980 "src/parse/lex.cc"
yy438:
	yyaccept = 0;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '/') goto yy439;
	if (yych <= '7') goto yy454;
yy439:
#line 777 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error in octal escape sequence"); exit(1); }
#line 3989 "src/parse/lex.cc"
yy440:
	++cur;
	goto yy439;
yy441:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy442;
		if (yych <= '9') goto yy456;
	} else {
		if (yych <= 'F') goto yy456;
		if (yych <= '`') goto yy442;
		if (yych <= 'f') goto yy456;
	}
yy442:
#line 776 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error in hexadecimal escape sequence"); exit(1); }
#line 4007 "src/parse/lex.cc"
yy443:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy442;
		if (yych <= '9') goto yy457;
		goto yy442;
	} else {
		if (yych <= 'F') goto yy457;
		if (yych <= '`') goto yy442;
		if (yych <= 'f') goto yy457;
		goto yy442;
	}
yy444:
	++cur;
#line 793 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\\'); }
#line 4025 "src/parse/lex.cc"
yy445:
	++cur;
#line 795 "../src/parse/lex.re"
	{ return static_cast<uint8_t>(']'); }
#line 4030 "src/parse/lex.cc"
yy446:
	++cur;
#line 786 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\a'); }
#line 4035 "src/parse/lex.cc"
yy447:
	++cur;
#line 787 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\b'); }
#line 4040 "src/parse/lex.cc"
yy448:
	++cur;
#line 788 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\f'); }
#line 4045 "src/parse/lex.cc"
yy449:
	++cur;
#line 789 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\n'); }
#line 4050 "src/parse/lex.cc"
yy450:
	++cur;
#line 790 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\r'); }
#line 4055 "src/parse/lex.cc"
yy451:
	++cur;
#line 791 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\t'); }
#line 4060 "src/parse/lex.cc"
yy452:
	++cur;
#line 792 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\v'); }
#line 4065 "src/parse/lex.cc"
yy453:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy442;
		if (yych <= '9') goto yy458;
		goto yy442;
	} else {
		if (yych <= 'F') goto yy458;
		if (yych <= '`') goto yy442;
		if (yych <= 'f') goto yy458;
		goto yy442;
	}
yy454:
	yych = (unsigned char)*++cur;
	if (yych <= '/') goto yy455;
	if (yych <= '7') goto yy459;
yy455:
	cur = mar;
	if (yyaccept == 0) {
		goto yy439;
	} else {
		goto yy442;
	}
yy456:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych <= '9') goto yy460;
		goto yy455;
	} else {
		if (yych <= 'F') goto yy460;
		if (yych <= '`') goto yy455;
		if (yych <= 'f') goto yy460;
		goto yy455;
	}
yy457:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych <= '9') goto yy461;
		goto yy455;
	} else {
		if (yych <= 'F') goto yy461;
		if (yych <= '`') goto yy455;
		if (yych <= 'f') goto yy461;
		goto yy455;
	}
yy458:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych <= '9') goto yy462;
		goto yy455;
	} else {
		if (yych <= 'F') goto yy462;
		if (yych <= '`') goto yy455;
		if (yych <= 'f') goto yy462;
		goto yy455;
	}
yy459:
	++cur;
#line 785 "../src/parse/lex.re"
	{ return unesc_oct(tok, cur); }
#line 4130 "src/parse/lex.cc"
yy460:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych <= '9') goto yy463;
		goto yy455;
	} else {
		if (yych <= 'F') goto yy463;
		if (yych <= '`') goto yy455;
		if (yych <= 'f') goto yy463;
		goto yy455;
	}
yy461:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych <= '9') goto yy458;
		goto yy455;
	} else {
		if (yych <= 'F') goto yy458;
		if (yych <= '`') goto yy455;
		if (yych <= 'f') goto yy458;
		goto yy455;
	}
yy462:
	++cur;
#line 784 "../src/parse/lex.re"
	{ return unesc_hex(tok, cur); }
#line 4159 "src/parse/lex.cc"
yy463:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych >= ':') goto yy455;
	} else {
		if (yych <= 'F') goto yy464;
		if (yych <= '`') goto yy455;
		if (yych >= 'g') goto yy455;
	}
yy464:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy455;
		if (yych <= '9') goto yy457;
		goto yy455;
	} else {
		if (yych <= 'F') goto yy457;
		if (yych <= '`') goto yy455;
		if (yych <= 'f') goto yy457;
		goto yy455;
	}
}
#line 802 "../src/parse/lex.re"

    }
    else {
        
#line 4188 "src/parse/lex.cc"
{
	unsigned char yych;
	unsigned int yyaccept = 0;
	if ((lim - cur) < 10) { if (!fill(10)) { error("unexpected end of input"); exit(1); } }
	yych = (unsigned char)*cur;
	if (yych <= 0x7F) {
		if (yych <= '\f') {
			if (yych <= 0x00) goto yy466;
			if (yych == '\n') goto yy469;
			goto yy467;
		} else {
			if (yych <= '\r') goto yy470;
			if (yych == '\\') goto yy471;
			goto yy467;
		}
	} else {
		if (yych <= 0xEF) {
			if (yych <= 0xC1) goto yy473;
			if (yych <= 0xDF) goto yy475;
			if (yych <= 0xE0) goto yy476;
			goto yy477;
		} else {
			if (yych <= 0xF0) goto yy478;
			if (yych <= 0xF3) goto yy479;
			if (yych <= 0xF4) goto yy480;
			goto yy473;
		}
	}
yy466:
	++cur;
#line 781 "../src/parse/lex.re"
	{ fail_if_eof(); return 0; }
#line 4221 "src/parse/lex.cc"
yy467:
	++cur;
yy468:
#line 783 "../src/parse/lex.re"
	{ return decode(tok); }
#line 4227 "src/parse/lex.cc"
yy469:
	++cur;
#line 775 "../src/parse/lex.re"
	{ msg.error(loc, "newline in character class"); exit(1); }
#line 4232 "src/parse/lex.cc"
yy470:
	yych = (unsigned char)*++cur;
	if (yych == '\n') goto yy469;
	goto yy468;
yy471:
	yyaccept = 0;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= 'b') {
		if (yych <= '7') {
			if (yych <= '\r') {
				if (yych <= '\t') {
					if (yych >= 0x01) goto yy481;
				} else {
					if (yych <= '\n') goto yy469;
					if (yych <= '\f') goto yy481;
					goto yy483;
				}
			} else {
				if (yych <= '-') {
					if (yych <= ',') goto yy481;
					goto yy484;
				} else {
					if (yych <= '/') goto yy481;
					if (yych <= '3') goto yy485;
					goto yy487;
				}
			}
		} else {
			if (yych <= '[') {
				if (yych <= 'U') {
					if (yych <= 'T') goto yy481;
					goto yy488;
				} else {
					if (yych == 'X') goto yy490;
					goto yy481;
				}
			} else {
				if (yych <= ']') {
					if (yych <= '\\') goto yy491;
					goto yy492;
				} else {
					if (yych <= '`') goto yy481;
					if (yych <= 'a') goto yy493;
					goto yy494;
				}
			}
		}
	} else {
		if (yych <= 'v') {
			if (yych <= 'q') {
				if (yych <= 'f') {
					if (yych <= 'e') goto yy481;
					goto yy495;
				} else {
					if (yych == 'n') goto yy496;
					goto yy481;
				}
			} else {
				if (yych <= 's') {
					if (yych <= 'r') goto yy497;
					goto yy481;
				} else {
					if (yych <= 't') goto yy498;
					if (yych <= 'u') goto yy490;
					goto yy499;
				}
			}
		} else {
			if (yych <= 0xDF) {
				if (yych <= 'x') {
					if (yych <= 'w') goto yy481;
					goto yy500;
				} else {
					if (yych <= 0x7F) goto yy481;
					if (yych >= 0xC2) goto yy501;
				}
			} else {
				if (yych <= 0xF0) {
					if (yych <= 0xE0) goto yy503;
					if (yych <= 0xEF) goto yy504;
					goto yy505;
				} else {
					if (yych <= 0xF3) goto yy506;
					if (yych <= 0xF4) goto yy507;
				}
			}
		}
	}
yy472:
#line 778 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error in escape sequence"); exit(1); }
#line 4324 "src/parse/lex.cc"
yy473:
	++cur;
yy474:
#line 779 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error"); exit(1); }
#line 4330 "src/parse/lex.cc"
yy475:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy474;
	if (yych <= 0xBF) goto yy467;
	goto yy474;
yy476:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= 0x9F) goto yy474;
	if (yych <= 0xBF) goto yy508;
	goto yy474;
yy477:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= 0x7F) goto yy474;
	if (yych <= 0xBF) goto yy508;
	goto yy474;
yy478:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= 0x8F) goto yy474;
	if (yych <= 0xBF) goto yy509;
	goto yy474;
yy479:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= 0x7F) goto yy474;
	if (yych <= 0xBF) goto yy509;
	goto yy474;
yy480:
	yyaccept = 1;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= 0x7F) goto yy474;
	if (yych <= 0x8F) goto yy509;
	goto yy474;
yy481:
	++cur;
yy482:
#line 796 "../src/parse/lex.re"
	{
        msg.warn.useless_escape(loc, tok, cur);
        return decode(tok + 1);
    }
#line 4374 "src/parse/lex.cc"
yy483:
	yych = (unsigned char)*++cur;
	if (yych == '\n') goto yy469;
	goto yy482;
yy484:
	++cur;
#line 794 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('-'); }
#line 4383 "src/parse/lex.cc"
yy485:
	yyaccept = 2;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '/') goto yy486;
	if (yych <= '7') goto yy510;
yy486:
#line 777 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error in octal escape sequence"); exit(1); }
#line 4392 "src/parse/lex.cc"
yy487:
	++cur;
	goto yy486;
yy488:
	yyaccept = 3;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy489;
		if (yych <= '9') goto yy511;
	} else {
		if (yych <= 'F') goto yy511;
		if (yych <= '`') goto yy489;
		if (yych <= 'f') goto yy511;
	}
yy489:
#line 776 "../src/parse/lex.re"
	{ msg.error(loc, "syntax error in hexadecimal escape sequence"); exit(1); }
#line 4410 "src/parse/lex.cc"
yy490:
	yyaccept = 3;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy489;
		if (yych <= '9') goto yy512;
		goto yy489;
	} else {
		if (yych <= 'F') goto yy512;
		if (yych <= '`') goto yy489;
		if (yych <= 'f') goto yy512;
		goto yy489;
	}
yy491:
	++cur;
#line 793 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\\'); }
#line 4428 "src/parse/lex.cc"
yy492:
	++cur;
#line 795 "../src/parse/lex.re"
	{ return static_cast<uint8_t>(']'); }
#line 4433 "src/parse/lex.cc"
yy493:
	++cur;
#line 786 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\a'); }
#line 4438 "src/parse/lex.cc"
yy494:
	++cur;
#line 787 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\b'); }
#line 4443 "src/parse/lex.cc"
yy495:
	++cur;
#line 788 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\f'); }
#line 4448 "src/parse/lex.cc"
yy496:
	++cur;
#line 789 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\n'); }
#line 4453 "src/parse/lex.cc"
yy497:
	++cur;
#line 790 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\r'); }
#line 4458 "src/parse/lex.cc"
yy498:
	++cur;
#line 791 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\t'); }
#line 4463 "src/parse/lex.cc"
yy499:
	++cur;
#line 792 "../src/parse/lex.re"
	{ return static_cast<uint8_t>('\v'); }
#line 4468 "src/parse/lex.cc"
yy500:
	yyaccept = 3;
	yych = (unsigned char)*(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy489;
		if (yych <= '9') goto yy513;
		goto yy489;
	} else {
		if (yych <= 'F') goto yy513;
		if (yych <= '`') goto yy489;
		if (yych <= 'f') goto yy513;
		goto yy489;
	}
yy501:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy502;
	if (yych <= 0xBF) goto yy481;
yy502:
	cur = mar;
	if (yyaccept <= 1) {
		if (yyaccept == 0) {
			goto yy472;
		} else {
			goto yy474;
		}
	} else {
		if (yyaccept == 2) {
			goto yy486;
		} else {
			goto yy489;
		}
	}
yy503:
	yych = (unsigned char)*++cur;
	if (yych <= 0x9F) goto yy502;
	if (yych <= 0xBF) goto yy501;
	goto yy502;
yy504:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy502;
	if (yych <= 0xBF) goto yy501;
	goto yy502;
yy505:
	yych = (unsigned char)*++cur;
	if (yych <= 0x8F) goto yy502;
	if (yych <= 0xBF) goto yy504;
	goto yy502;
yy506:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy502;
	if (yych <= 0xBF) goto yy504;
	goto yy502;
yy507:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy502;
	if (yych <= 0x8F) goto yy504;
	goto yy502;
yy508:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy502;
	if (yych <= 0xBF) goto yy467;
	goto yy502;
yy509:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy502;
	if (yych <= 0xBF) goto yy508;
	goto yy502;
yy510:
	yych = (unsigned char)*++cur;
	if (yych <= '/') goto yy502;
	if (yych <= '7') goto yy514;
	goto yy502;
yy511:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych <= '9') goto yy515;
		goto yy502;
	} else {
		if (yych <= 'F') goto yy515;
		if (yych <= '`') goto yy502;
		if (yych <= 'f') goto yy515;
		goto yy502;
	}
yy512:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych <= '9') goto yy516;
		goto yy502;
	} else {
		if (yych <= 'F') goto yy516;
		if (yych <= '`') goto yy502;
		if (yych <= 'f') goto yy516;
		goto yy502;
	}
yy513:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych <= '9') goto yy517;
		goto yy502;
	} else {
		if (yych <= 'F') goto yy517;
		if (yych <= '`') goto yy502;
		if (yych <= 'f') goto yy517;
		goto yy502;
	}
yy514:
	++cur;
#line 785 "../src/parse/lex.re"
	{ return unesc_oct(tok, cur); }
#line 4581 "src/parse/lex.cc"
yy515:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych <= '9') goto yy518;
		goto yy502;
	} else {
		if (yych <= 'F') goto yy518;
		if (yych <= '`') goto yy502;
		if (yych <= 'f') goto yy518;
		goto yy502;
	}
yy516:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych <= '9') goto yy513;
		goto yy502;
	} else {
		if (yych <= 'F') goto yy513;
		if (yych <= '`') goto yy502;
		if (yych <= 'f') goto yy513;
		goto yy502;
	}
yy517:
	++cur;
#line 784 "../src/parse/lex.re"
	{ return unesc_hex(tok, cur); }
#line 4610 "src/parse/lex.cc"
yy518:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych >= ':') goto yy502;
	} else {
		if (yych <= 'F') goto yy519;
		if (yych <= '`') goto yy502;
		if (yych >= 'g') goto yy502;
	}
yy519:
	yych = (unsigned char)*++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy502;
		if (yych <= '9') goto yy512;
		goto yy502;
	} else {
		if (yych <= 'F') goto yy512;
		if (yych <= '`') goto yy502;
		if (yych <= 'f') goto yy512;
		goto yy502;
	}
}
#line 805 "../src/parse/lex.re"

    }
}