/* Generated by re2c 4.6 */
#line 1 "../src/parse/lexer.re"
#include <ctype.h>
#include <stdint.h>
#include <limits>
#include <string>
#include <utility>
#include <vector>

#include "src/codegen/helpers.h"
#include "src/codegen/output.h"
#include "src/encoding/enc.h"
#include "src/msg/location.h"
#include "src/msg/msg.h"
#include "src/msg/warn.h"
#include "src/options/opt.h"
#include "src/parse/ast.h"
#include "src/parse/input.h"
#include "src/parse/lexer.h"
#include "src/regexp/rule.h"
#include "src/util/check.h"
#include "src/util/string_utils.h"
#include "parser.h"

namespace re2c {

#line 28 "src/parse/lexer.cc"
size_t LexerState::maxfill_main() { return 18; }
#line 25 "../src/parse/lexer.re"


// Global re2c configurations and definitions.
#line 60 "../src/parse/lexer.re"


#line 132 "../src/parse/lexer.re"


#define RET_BLOCK(k) do { kind = k; return Ret::OK; } while(0)

Ret Input::lex_program(Output& out, std::string& block_name, InputBlock& kind) {
    const opt_t* opts = out.block().opts;
    const uint8_t* x, *y;

    if (is_eof()) RET_BLOCK(InputBlock::END);

next:
    tok = cur;
loop:
    location = cur_loc();
    ptr = cur;

#line 54 "src/parse/lexer.cc"
{
	uint8_t yych;
	unsigned int yyaccept = 0;
	static const unsigned char yybm[256] = {
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 160,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		160, 128,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		192, 192, 192, 192, 192, 192, 192, 192,
		192, 192, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128,   0, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128
	};
	if ((lim - cur) < 18) if (!fill(18)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\r') {
		if (yych <= '\t') {
			if (yych >= 0x01) goto yy1;
		} else {
			if (yych <= '\n') goto yy3;
			if (yych <= '\f') goto yy1;
			goto yy5;
		}
	} else {
		if (yych <= '%') {
			if (yych <= '$') goto yy1;
			goto yy6;
		} else {
			if (yych == '/') goto yy7;
			goto yy1;
		}
	}
	++cur;
#line 274 "../src/parse/lexer.re"
	{
        if (is_eof()) {
            out.gen_raw(tok, ptr);
            RET_BLOCK(InputBlock::END);
        }
        goto loop;
    }
#line 120 "src/parse/lexer.cc"
yy1:
	++cur;
yy2:
#line 294 "../src/parse/lexer.re"
	{ goto loop; }
#line 126 "src/parse/lexer.cc"
yy3:
	yyaccept = 0;
	yych = *(mar = ++cur);
	if (yybm[0+yych] & 32) goto yy8;
	if (yych == '#') goto yy10;
yy4:
#line 289 "../src/parse/lexer.re"
	{
        next_line();
        goto loop;
    }
#line 138 "src/parse/lexer.cc"
yy5:
	yych = *++cur;
	if (yych == '\n') goto yy3;
	goto yy2;
yy6:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych == '{') goto yy11;
	goto yy2;
yy7:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych == '*') goto yy12;
	goto yy2;
yy8:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 32) goto yy8;
	if (yych == '#') goto yy10;
yy9:
	cur = mar;
	if (yyaccept <= 2) {
		if (yyaccept <= 1) {
			if (yyaccept == 0) goto yy4;
			else goto yy2;
		} else {
			goto yy58;
		}
	} else {
		if (yyaccept <= 4) {
			if (yyaccept == 3) goto yy142;
			else goto yy144;
		} else {
			goto yy172;
		}
	}
yy10:
	++cur;
	if ((lim - cur) < 5) if (!fill(5)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy10;
		goto yy9;
	} else {
		if (yych <= ' ') goto yy10;
		if (yych == 'l') goto yy13;
		goto yy9;
	}
yy11:
	yych = *++cur;
	if (yych <= 'h') {
		if (yych <= '\r') {
			if (yych == '\n') {
				yyt1 = cur;
				goto yy14;
			}
			if (yych <= '\f') goto yy9;
			yyt1 = cur;
			goto yy15;
		} else {
			if (yych <= 'c') {
				if (yych <= 'b') goto yy9;
				goto yy16;
			} else {
				if (yych <= 'f') goto yy9;
				if (yych <= 'g') goto yy17;
				goto yy18;
			}
		}
	} else {
		if (yych <= 'q') {
			if (yych <= 'k') {
				if (yych <= 'i') goto yy19;
				goto yy9;
			} else {
				if (yych <= 'l') goto yy20;
				if (yych <= 'm') goto yy21;
				goto yy9;
			}
		} else {
			if (yych <= 's') {
				if (yych <= 'r') goto yy22;
				goto yy23;
			} else {
				if (yych == 'u') goto yy24;
				goto yy9;
			}
		}
	}
yy12:
	yych = *++cur;
	if (yych == '!') goto yy25;
	goto yy9;
yy13:
	yych = *++cur;
	if (yych == 'i') goto yy26;
	goto yy9;
yy14:
	++cur;
	cur = yyt1;
#line 148 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        CHECK_RET(lex_opt_name(block_name));
        RET_BLOCK(InputBlock::GLOBAL);
    }
#line 246 "src/parse/lexer.cc"
yy15:
	yych = *++cur;
	if (yych == '\n') goto yy14;
	goto yy9;
yy16:
	yych = *++cur;
	if (yych == 'o') goto yy27;
	goto yy9;
yy17:
	yych = *++cur;
	if (yych == 'e') goto yy28;
	goto yy9;
yy18:
	yych = *++cur;
	if (yych == 'e') goto yy29;
	goto yy9;
yy19:
	yych = *++cur;
	if (yych == 'g') goto yy30;
	if (yych == 'n') goto yy31;
	goto yy9;
yy20:
	yych = *++cur;
	if (yych == 'o') goto yy32;
	goto yy9;
yy21:
	yych = *++cur;
	if (yych <= 's') {
		if (yych == 'a') goto yy33;
		goto yy9;
	} else {
		if (yych <= 't') goto yy34;
		if (yych == 'v') goto yy35;
		goto yy9;
	}
yy22:
	yych = *++cur;
	if (yych == 'u') goto yy36;
	goto yy9;
yy23:
	yych = *++cur;
	if (yych == 't') goto yy37;
	if (yych == 'v') goto yy38;
	goto yy9;
yy24:
	yych = *++cur;
	if (yych == 's') goto yy39;
	goto yy9;
yy25:
	yych = *++cur;
	switch (yych) {
		case 'c': goto yy40;
		case 'g': goto yy41;
		case 'h': goto yy42;
		case 'i': goto yy43;
		case 'l': goto yy44;
		case 'm': goto yy45;
		case 'r': goto yy46;
		case 's': goto yy47;
		case 't': goto yy48;
		case 'u': goto yy49;
		default: goto yy9;
	}
yy26:
	yych = *++cur;
	if (yych == 'n') goto yy50;
	goto yy9;
yy27:
	yych = *++cur;
	if (yych == 'n') goto yy51;
	goto yy9;
yy28:
	yych = *++cur;
	if (yych == 't') goto yy52;
	goto yy9;
yy29:
	yych = *++cur;
	if (yych == 'a') goto yy53;
	goto yy9;
yy30:
	yych = *++cur;
	if (yych == 'n') goto yy54;
	goto yy9;
yy31:
	yych = *++cur;
	if (yych == 'c') goto yy55;
	goto yy9;
yy32:
	yych = *++cur;
	if (yych == 'c') goto yy56;
	goto yy9;
yy33:
	yych = *++cur;
	if (yych == 'x') goto yy57;
	goto yy9;
yy34:
	yych = *++cur;
	if (yych == 'a') goto yy59;
	goto yy9;
yy35:
	yych = *++cur;
	if (yych == 'a') goto yy60;
	goto yy9;
yy36:
	yych = *++cur;
	if (yych == 'l') goto yy61;
	goto yy9;
yy37:
	yych = *++cur;
	if (yych == 'a') goto yy62;
	goto yy9;
yy38:
	yych = *++cur;
	if (yych == 'a') goto yy63;
	goto yy9;
yy39:
	yych = *++cur;
	if (yych == 'e') goto yy64;
	goto yy9;
yy40:
	yych = *++cur;
	if (yych == 'o') goto yy65;
	goto yy9;
yy41:
	yych = *++cur;
	if (yych == 'e') goto yy66;
	goto yy9;
yy42:
	yych = *++cur;
	if (yych == 'e') goto yy67;
	goto yy9;
yy43:
	yych = *++cur;
	if (yych == 'g') goto yy68;
	if (yych == 'n') goto yy69;
	goto yy9;
yy44:
	yych = *++cur;
	if (yych == 'o') goto yy70;
	goto yy9;
yy45:
	yych = *++cur;
	if (yych <= 's') {
		if (yych == 'a') goto yy71;
		goto yy9;
	} else {
		if (yych <= 't') goto yy72;
		if (yych == 'v') goto yy73;
		goto yy9;
	}
yy46:
	yych = *++cur;
	if (yych == 'e') goto yy74;
	if (yych == 'u') goto yy75;
	goto yy9;
yy47:
	yych = *++cur;
	if (yych == 't') goto yy76;
	if (yych == 'v') goto yy77;
	goto yy9;
yy48:
	yych = *++cur;
	if (yych == 'y') goto yy78;
	goto yy9;
yy49:
	yych = *++cur;
	if (yych == 's') goto yy79;
	goto yy9;
yy50:
	yych = *++cur;
	if (yych == 'e') goto yy80;
	goto yy9;
yy51:
	yych = *++cur;
	if (yych == 'd') goto yy81;
	goto yy9;
yy52:
	yych = *++cur;
	if (yych == 's') goto yy82;
	goto yy9;
yy53:
	yych = *++cur;
	if (yych == 'd') goto yy83;
	goto yy9;
yy54:
	yych = *++cur;
	if (yych == 'o') goto yy84;
	goto yy9;
yy55:
	yych = *++cur;
	if (yych == 'l') goto yy85;
	goto yy9;
yy56:
	yych = *++cur;
	if (yych == 'a') goto yy86;
	goto yy9;
yy57:
	yyaccept = 2;
	yych = *(mar = ++cur);
	if (yych == 'n') goto yy87;
yy58:
#line 178 "../src/parse/lexer.re"
	{
        CHECK_RET(lex_special_block(out, CodeKind::MAXFILL, DCONF_FORMAT));
        goto next;
    }
#line 453 "src/parse/lexer.cc"
yy59:
	yych = *++cur;
	if (yych == 'g') goto yy88;
	goto yy9;
yy60:
	yych = *++cur;
	if (yych == 'r') goto yy89;
	goto yy9;
yy61:
	yych = *++cur;
	if (yych == 'e') goto yy90;
	goto yy9;
yy62:
	yych = *++cur;
	if (yych == 'g') goto yy91;
	goto yy9;
yy63:
	yych = *++cur;
	if (yych == 'r') goto yy92;
	goto yy9;
yy64:
	++cur;
#line 172 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        CHECK_RET(lex_opt_name(block_name));
        RET_BLOCK(InputBlock::USE);
    }
#line 482 "src/parse/lexer.cc"
yy65:
	yych = *++cur;
	if (yych == 'n') goto yy93;
	goto yy9;
yy66:
	yych = *++cur;
	if (yych == 't') goto yy94;
	goto yy9;
yy67:
	yych = *++cur;
	if (yych == 'a') goto yy95;
	goto yy9;
yy68:
	yych = *++cur;
	if (yych == 'n') goto yy96;
	goto yy9;
yy69:
	yych = *++cur;
	if (yych == 'c') goto yy97;
	goto yy9;
yy70:
	yych = *++cur;
	if (yych == 'c') goto yy98;
	goto yy9;
yy71:
	yych = *++cur;
	if (yych == 'x') goto yy99;
	goto yy9;
yy72:
	yych = *++cur;
	if (yych == 'a') goto yy100;
	goto yy9;
yy73:
	yych = *++cur;
	if (yych == 'a') goto yy101;
	goto yy9;
yy74:
	yych = *++cur;
	if (yych == '2') goto yy102;
	goto yy9;
yy75:
	yych = *++cur;
	if (yych == 'l') goto yy103;
	goto yy9;
yy76:
	yych = *++cur;
	if (yych == 'a') goto yy104;
	goto yy9;
yy77:
	yych = *++cur;
	if (yych == 'a') goto yy105;
	goto yy9;
yy78:
	yych = *++cur;
	if (yych == 'p') goto yy106;
	goto yy9;
yy79:
	yych = *++cur;
	if (yych == 'e') goto yy107;
	goto yy9;
yy80:
	yych = *++cur;
	if (yych <= '0') goto yy109;
	if (yych <= '9') goto yy9;
	goto yy109;
yy81:
	yych = *++cur;
	if (yych == 'i') goto yy110;
	goto yy9;
yy82:
	yych = *++cur;
	if (yych == 't') goto yy111;
	goto yy9;
yy83:
	yych = *++cur;
	if (yych == 'e') goto yy112;
	goto yy9;
yy84:
	yych = *++cur;
	if (yych == 'r') goto yy113;
	goto yy9;
yy85:
	yych = *++cur;
	if (yych == 'u') goto yy114;
	goto yy9;
yy86:
	yych = *++cur;
	if (yych == 'l') goto yy115;
	goto yy9;
yy87:
	yych = *++cur;
	if (yych == 'm') goto yy116;
	goto yy9;
yy88:
	yych = *++cur;
	if (yych == 's') goto yy117;
	goto yy9;
yy89:
	yych = *++cur;
	if (yych == 's') goto yy118;
	goto yy9;
yy90:
	yych = *++cur;
	if (yych == 's') goto yy119;
	goto yy9;
yy91:
	yych = *++cur;
	if (yych == 's') goto yy120;
	goto yy9;
yy92:
	yych = *++cur;
	if (yych == 's') goto yy121;
	goto yy9;
yy93:
	yych = *++cur;
	if (yych == 'd') goto yy122;
	goto yy9;
yy94:
	yych = *++cur;
	if (yych == 's') goto yy123;
	goto yy9;
yy95:
	yych = *++cur;
	if (yych == 'd') goto yy124;
	goto yy9;
yy96:
	yych = *++cur;
	if (yych == 'o') goto yy125;
	goto yy9;
yy97:
	yych = *++cur;
	if (yych == 'l') goto yy126;
	goto yy9;
yy98:
	yych = *++cur;
	if (yych == 'a') goto yy127;
	goto yy9;
yy99:
	yych = *++cur;
	if (yych == ':') goto yy128;
	if (yych == 'n') goto yy129;
	goto yy9;
yy100:
	yych = *++cur;
	if (yych == 'g') goto yy130;
	goto yy9;
yy101:
	yych = *++cur;
	if (yych == 'r') goto yy131;
	goto yy9;
yy102:
	yych = *++cur;
	if (yych == 'c') goto yy132;
	goto yy9;
yy103:
	yych = *++cur;
	if (yych == 'e') goto yy133;
	goto yy9;
yy104:
	yych = *++cur;
	if (yych == 'g') goto yy134;
	goto yy9;
yy105:
	yych = *++cur;
	if (yych == 'r') goto yy135;
	goto yy9;
yy106:
	yych = *++cur;
	if (yych == 'e') goto yy136;
	goto yy9;
yy107:
	yych = *++cur;
	if (yych == ':') goto yy137;
	goto yy9;
yy108:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy109:
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy108;
		goto yy9;
	} else {
		if (yych <= ' ') goto yy108;
		if (yych <= '0') goto yy9;
		if (yych <= '9') {
			yyt1 = cur;
			goto yy138;
		}
		goto yy9;
	}
yy110:
	yych = *++cur;
	if (yych == 't') goto yy139;
	goto yy9;
yy111:
	yych = *++cur;
	if (yych == 'a') goto yy140;
	goto yy9;
yy112:
	yych = *++cur;
	if (yych == 'r') goto yy141;
	goto yy9;
yy113:
	yych = *++cur;
	if (yych == 'e') goto yy143;
	goto yy9;
yy114:
	yych = *++cur;
	if (yych == 'd') goto yy145;
	goto yy9;
yy115:
	++cur;
#line 160 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        CHECK_RET(lex_opt_name(block_name));
        RET_BLOCK(InputBlock::LOCAL);
    }
#line 702 "src/parse/lexer.cc"
yy116:
	yych = *++cur;
	if (yych == 'a') goto yy146;
	goto yy9;
yy117:
	++cur;
#line 194 "../src/parse/lexer.re"
	{
        uint32_t allow = DCONF_FORMAT | DCONF_SEPARATOR;
        CHECK_RET(lex_special_block(out, CodeKind::MTAGS, allow));
        goto next;
    }
#line 715 "src/parse/lexer.cc"
yy118:
	++cur;
#line 206 "../src/parse/lexer.re"
	{
        uint32_t allow = DCONF_FORMAT | DCONF_SEPARATOR;
        CHECK_RET(lex_special_block(out, CodeKind::MVARS, allow));
        goto next;
    }
#line 724 "src/parse/lexer.cc"
yy119:
	++cur;
#line 166 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        CHECK_RET(lex_opt_name(block_name));
        RET_BLOCK(InputBlock::RULES);
    }
#line 733 "src/parse/lexer.cc"
yy120:
	++cur;
#line 188 "../src/parse/lexer.re"
	{
        uint32_t allow = DCONF_FORMAT | DCONF_SEPARATOR;
        CHECK_RET(lex_special_block(out, CodeKind::STAGS, allow));
        goto next;
    }
#line 742 "src/parse/lexer.cc"
yy121:
	++cur;
#line 200 "../src/parse/lexer.re"
	{
        uint32_t allow = DCONF_FORMAT | DCONF_SEPARATOR;
        CHECK_RET(lex_special_block(out, CodeKind::SVARS, allow));
        goto next;
    }
#line 751 "src/parse/lexer.cc"
yy122:
	yych = *++cur;
	if (yych == 'i') goto yy147;
	goto yy9;
yy123:
	yych = *++cur;
	if (yych == 't') goto yy148;
	goto yy9;
yy124:
	yych = *++cur;
	if (yych == 'e') goto yy149;
	goto yy9;
yy125:
	yych = *++cur;
	if (yych == 'r') goto yy150;
	goto yy9;
yy126:
	yych = *++cur;
	if (yych == 'u') goto yy151;
	goto yy9;
yy127:
	yych = *++cur;
	if (yych == 'l') goto yy152;
	goto yy9;
yy128:
	yych = *++cur;
	if (yych == 'r') goto yy153;
	goto yy9;
yy129:
	yych = *++cur;
	if (yych == 'm') goto yy154;
	goto yy9;
yy130:
	yych = *++cur;
	if (yych == 's') goto yy155;
	goto yy9;
yy131:
	yych = *++cur;
	if (yych == 's') goto yy156;
	goto yy9;
yy132:
	++cur;
#line 154 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        CHECK_RET(lex_opt_name(block_name));
        RET_BLOCK(InputBlock::GLOBAL);
    }
#line 800 "src/parse/lexer.cc"
yy133:
	yych = *++cur;
	if (yych == 's') goto yy157;
	goto yy9;
yy134:
	yych = *++cur;
	if (yych == 's') goto yy158;
	goto yy9;
yy135:
	yych = *++cur;
	if (yych == 's') goto yy159;
	goto yy9;
yy136:
	yych = *++cur;
	if (yych == 's') goto yy160;
	goto yy9;
yy137:
	yych = *++cur;
	if (yych == 'r') goto yy161;
	goto yy9;
yy138:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 64) goto yy138;
	if (yych <= '\f') {
		if (yych <= 0x08) goto yy9;
		if (yych <= '\t') goto yy162;
		if (yych <= '\n') goto yy163;
		goto yy9;
	} else {
		if (yych <= '\r') goto yy164;
		if (yych == ' ') goto yy162;
		goto yy9;
	}
yy139:
	yych = *++cur;
	if (yych == 'i') goto yy165;
	goto yy9;
yy140:
	yych = *++cur;
	if (yych == 't') goto yy166;
	goto yy9;
yy141:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych == ':') goto yy167;
yy142:
#line 248 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_cur("ill-formed `header` block: expected `:on` or `:off`"));
    }
#line 853 "src/parse/lexer.cc"
yy143:
	yyaccept = 4;
	yych = *(mar = ++cur);
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych >= '\t') {
				yyt1 = cur;
				goto yy168;
			}
		} else {
			if (yych == '\r') {
				yyt1 = cur;
				goto yy168;
			}
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt1 = cur;
				goto yy168;
			}
			if (yych >= '%') {
				yyt1 = cur;
				goto yy169;
			}
		} else {
			if (yych == '*') {
				yyt1 = cur;
				goto yy170;
			}
		}
	}
yy144:
#line 269 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_cur(
                "ill-formed `ignore` block: expected a space, a newline, or the end of block"));
    }
#line 892 "src/parse/lexer.cc"
yy145:
	yych = *++cur;
	if (yych == 'e') goto yy171;
	goto yy9;
yy146:
	yych = *++cur;
	if (yych == 't') goto yy173;
	goto yy9;
yy147:
	yych = *++cur;
	if (yych == 't') goto yy174;
	goto yy9;
yy148:
	yych = *++cur;
	if (yych == 'a') goto yy175;
	goto yy9;
yy149:
	yych = *++cur;
	if (yych == 'r') goto yy176;
	goto yy9;
yy150:
	yych = *++cur;
	if (yych == 'e') goto yy177;
	goto yy9;
yy151:
	yych = *++cur;
	if (yych == 'd') goto yy178;
	goto yy9;
yy152:
	yych = *++cur;
	if (yych == ':') goto yy179;
	goto yy9;
yy153:
	yych = *++cur;
	if (yych == 'e') goto yy180;
	goto yy9;
yy154:
	yych = *++cur;
	if (yych == 'a') goto yy181;
	goto yy9;
yy155:
	yych = *++cur;
	if (yych == ':') goto yy182;
	goto yy9;
yy156:
	yych = *++cur;
	if (yych == ':') goto yy183;
	goto yy9;
yy157:
	yych = *++cur;
	if (yych == ':') goto yy184;
	goto yy9;
yy158:
	yych = *++cur;
	if (yych == ':') goto yy185;
	goto yy9;
yy159:
	yych = *++cur;
	if (yych == ':') goto yy186;
	goto yy9;
yy160:
	yych = *++cur;
	if (yych == ':') goto yy187;
	goto yy9;
yy161:
	yych = *++cur;
	if (yych == 'e') goto yy188;
	goto yy9;
yy162:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy162;
		goto yy9;
	} else {
		if (yych <= ' ') goto yy162;
		if (yych == '"') goto yy189;
		goto yy9;
	}
yy163:
	++cur;
	cur = yyt1;
#line 282 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        out.gen_stmt(code_newline(alc));
        CHECK_RET(set_sourceline());
        goto next;
    }
#line 983 "src/parse/lexer.cc"
yy164:
	yych = *++cur;
	if (yych == '\n') goto yy163;
	goto yy9;
yy165:
	yych = *++cur;
	if (yych == 'o') goto yy190;
	goto yy9;
yy166:
	yych = *++cur;
	if (yych == 'e') goto yy191;
	goto yy9;
yy167:
	yych = *++cur;
	if (yych == 'o') goto yy192;
	goto yy9;
yy168:
	++cur;
	cur = yyt1;
#line 263 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        // allows arbitrary garbage before the end of the comment
        CHECK_RET(lex_block_end(out, true));
        goto next;
    }
#line 1010 "src/parse/lexer.cc"
yy169:
	yych = *++cur;
	if (yych == '}') goto yy168;
	goto yy9;
yy170:
	yych = *++cur;
	if (yych == '/') goto yy168;
	goto yy9;
yy171:
	yyaccept = 5;
	yych = *(mar = ++cur);
	if (yych == '\t') goto yy193;
	if (yych == ' ') goto yy193;
yy172:
#line 259 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_cur("ill-formed `include` block: expected filename in quotes"));
    }
#line 1029 "src/parse/lexer.cc"
yy173:
	yych = *++cur;
	if (yych == 'c') goto yy194;
	goto yy9;
yy174:
	yych = *++cur;
	if (yych == 'i') goto yy195;
	goto yy9;
yy175:
	yych = *++cur;
	if (yych == 't') goto yy196;
	goto yy9;
yy176:
	yych = *++cur;
	if (yych == ':') goto yy197;
	goto yy9;
yy177:
	yych = *++cur;
	if (yych == ':') goto yy198;
	goto yy9;
yy178:
	yych = *++cur;
	if (yych == 'e') goto yy199;
	goto yy9;
yy179:
	yych = *++cur;
	if (yych == 'r') goto yy200;
	goto yy9;
yy180:
	yych = *++cur;
	if (yych == '2') goto yy201;
	goto yy9;
yy181:
	yych = *++cur;
	if (yych == 't') goto yy202;
	goto yy9;
yy182:
	yych = *++cur;
	if (yych == 'r') goto yy203;
	goto yy9;
yy183:
	yych = *++cur;
	if (yych == 'r') goto yy204;
	goto yy9;
yy184:
	yych = *++cur;
	if (yych == 'r') goto yy205;
	goto yy9;
yy185:
	yych = *++cur;
	if (yych == 'r') goto yy206;
	goto yy9;
yy186:
	yych = *++cur;
	if (yych == 'r') goto yy207;
	goto yy9;
yy187:
	yych = *++cur;
	if (yych == 'r') goto yy208;
	goto yy9;
yy188:
	yych = *++cur;
	if (yych == '2') goto yy209;
	goto yy9;
yy189:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy189;
	if (yych <= '\n') goto yy9;
	if (yych <= '"') goto yy210;
	goto yy211;
yy190:
	yych = *++cur;
	if (yych == 'n') goto yy212;
	goto yy9;
yy191:
	++cur;
#line 220 "../src/parse/lexer.re"
	{
        out.state_goto = true;
        if (!opts->storable_state) {
            RET_FAIL(error_at_cur("`getstate` without `-f --storable-state` option"));
        } else if (opts->code_model == CodeModel::LOOP_SWITCH) {
            RET_FAIL(error_at_cur(
                    "`getstate` is incompatible with --loop-switch code model, it requires"
                    " cross-block `goto` transitions or function calls"));
        }
        CHECK_RET(lex_special_block(out, CodeKind::STATE_GOTO, 0));
        goto next;
    }
#line 1121 "src/parse/lexer.cc"
yy192:
	yych = *++cur;
	if (yych == 'f') goto yy213;
	if (yych == 'n') goto yy214;
	goto yy9;
yy193:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy193;
		goto yy9;
	} else {
		if (yych <= ' ') goto yy193;
		if (yych == '"') {
			yyt1 = cur;
			goto yy215;
		}
		goto yy9;
	}
yy194:
	yych = *++cur;
	if (yych == 'h') goto yy216;
	goto yy9;
yy195:
	yych = *++cur;
	if (yych == 'o') goto yy217;
	goto yy9;
yy196:
	yych = *++cur;
	if (yych == 'e') goto yy218;
	goto yy9;
yy197:
	yych = *++cur;
	if (yych == 'r') goto yy219;
	goto yy9;
yy198:
	yych = *++cur;
	if (yych == 'r') goto yy220;
	goto yy9;
yy199:
	yych = *++cur;
	if (yych == ':') goto yy221;
	goto yy9;
yy200:
	yych = *++cur;
	if (yych == 'e') goto yy222;
	goto yy9;
yy201:
	yych = *++cur;
	if (yych == 'c') goto yy223;
	goto yy9;
yy202:
	yych = *++cur;
	if (yych == 'c') goto yy224;
	goto yy9;
yy203:
	yych = *++cur;
	if (yych == 'e') goto yy225;
	goto yy9;
yy204:
	yych = *++cur;
	if (yych == 'e') goto yy226;
	goto yy9;
yy205:
	yych = *++cur;
	if (yych == 'e') goto yy227;
	goto yy9;
yy206:
	yych = *++cur;
	if (yych == 'e') goto yy228;
	goto yy9;
yy207:
	yych = *++cur;
	if (yych == 'e') goto yy229;
	goto yy9;
yy208:
	yych = *++cur;
	if (yych == 'e') goto yy230;
	goto yy9;
yy209:
	yych = *++cur;
	if (yych == 'c') goto yy64;
	goto yy9;
yy210:
	yych = *++cur;
	if (yych == '\n') goto yy163;
	if (yych == '\r') goto yy164;
	goto yy9;
yy211:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x00) goto yy9;
	if (yych == '\n') goto yy9;
	goto yy189;
yy212:
	yych = *++cur;
	if (yych == 's') goto yy231;
	goto yy9;
yy213:
	yych = *++cur;
	if (yych == 'f') goto yy232;
	goto yy9;
yy214:
	++cur;
#line 233 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        out.header_mode(true);
        out.need_header = true;
        CHECK_RET(lex_block_end(out));
        goto next;
    }
#line 1236 "src/parse/lexer.cc"
yy215:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '!') {
		if (yych <= 0x00) goto yy9;
		if (yych == '\n') goto yy9;
		goto yy215;
	} else {
		if (yych <= '"') goto yy233;
		if (yych == '\\') goto yy234;
		goto yy215;
	}
yy216:
	++cur;
#line 183 "../src/parse/lexer.re"
	{
        CHECK_RET(lex_special_block(out, CodeKind::MAXNMATCH, DCONF_FORMAT));
        goto next;
    }
#line 1257 "src/parse/lexer.cc"
yy217:
	yych = *++cur;
	if (yych == 'n') goto yy136;
	goto yy9;
yy218:
	yych = *++cur;
	if (yych == ':') goto yy235;
	goto yy9;
yy219:
	yych = *++cur;
	if (yych == 'e') goto yy236;
	goto yy9;
yy220:
	yych = *++cur;
	if (yych == 'e') goto yy237;
	goto yy9;
yy221:
	yych = *++cur;
	if (yych == 'r') goto yy238;
	goto yy9;
yy222:
	yych = *++cur;
	if (yych == '2') goto yy239;
	goto yy9;
yy223:
	++cur;
	goto yy58;
yy224:
	yych = *++cur;
	if (yych == 'h') goto yy240;
	goto yy9;
yy225:
	yych = *++cur;
	if (yych == '2') goto yy241;
	goto yy9;
yy226:
	yych = *++cur;
	if (yych == '2') goto yy242;
	goto yy9;
yy227:
	yych = *++cur;
	if (yych == '2') goto yy243;
	goto yy9;
yy228:
	yych = *++cur;
	if (yych == '2') goto yy244;
	goto yy9;
yy229:
	yych = *++cur;
	if (yych == '2') goto yy245;
	goto yy9;
yy230:
	yych = *++cur;
	if (yych == '2') goto yy246;
	goto yy9;
yy231:
	++cur;
#line 212 "../src/parse/lexer.re"
	{
        out.cond_enum_autogen = false;
        out.warn_condition_order = false; // see note [condition order]
        uint32_t allow = DCONF_FORMAT | DCONF_SEPARATOR;
        CHECK_RET(lex_special_block(out, CodeKind::COND_ENUM, allow));
        goto next;
    }
#line 1323 "src/parse/lexer.cc"
yy232:
	++cur;
#line 241 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        out.header_mode(false);
        if (globopts->line_dirs) out.gen_stmt(code_line_info_input(alc, cur_loc()));
        CHECK_RET(lex_block_end(out));
        goto next;
    }
#line 1334 "src/parse/lexer.cc"
yy233:
	yych = *++cur;
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy9;
			yyt2 = cur;
			goto yy247;
		} else {
			if (yych == '\r') {
				yyt2 = cur;
				goto yy247;
			}
			goto yy9;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt2 = cur;
				goto yy247;
			}
			if (yych <= '$') goto yy9;
			yyt2 = cur;
			goto yy248;
		} else {
			if (yych == '*') {
				yyt2 = cur;
				goto yy249;
			}
			goto yy9;
		}
	}
yy234:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x00) goto yy9;
	if (yych == '\n') goto yy9;
	goto yy215;
yy235:
	yych = *++cur;
	if (yych == 'r') goto yy250;
	goto yy9;
yy236:
	yych = *++cur;
	if (yych == '2') goto yy251;
	goto yy9;
yy237:
	yych = *++cur;
	if (yych == '2') goto yy252;
	goto yy9;
yy238:
	yych = *++cur;
	if (yych == 'e') goto yy253;
	goto yy9;
yy239:
	yych = *++cur;
	if (yych == 'c') goto yy115;
	goto yy9;
yy240:
	yych = *++cur;
	if (yych == ':') goto yy254;
	goto yy9;
yy241:
	yych = *++cur;
	if (yych == 'c') goto yy117;
	goto yy9;
yy242:
	yych = *++cur;
	if (yych == 'c') goto yy118;
	goto yy9;
yy243:
	yych = *++cur;
	if (yych == 'c') goto yy119;
	goto yy9;
yy244:
	yych = *++cur;
	if (yych == 'c') goto yy120;
	goto yy9;
yy245:
	yych = *++cur;
	if (yych == 'c') goto yy121;
	goto yy9;
yy246:
	yych = *++cur;
	if (yych == 'c') goto yy231;
	goto yy9;
yy247:
	++cur;
	x = yyt1;
	y = yyt2;
	cur = yyt2;
#line 252 "../src/parse/lexer.re"
	{
        out.gen_raw(tok, ptr);
        CHECK_RET(lex_block_end(out));
        CHECK_RET(include(getstr(x + 1, y - 1), ptr));
        if (globopts->line_dirs) out.gen_stmt(code_line_info_input(alc, cur_loc()));
        goto next;
    }
#line 1434 "src/parse/lexer.cc"
yy248:
	yych = *++cur;
	if (yych == '}') goto yy247;
	goto yy9;
yy249:
	yych = *++cur;
	if (yych == '/') goto yy247;
	goto yy9;
yy250:
	yych = *++cur;
	if (yych == 'e') goto yy255;
	goto yy9;
yy251:
	yych = *++cur;
	if (yych == 'c') goto yy141;
	goto yy9;
yy252:
	yych = *++cur;
	if (yych == 'c') goto yy143;
	goto yy9;
yy253:
	yych = *++cur;
	if (yych == '2') goto yy256;
	goto yy9;
yy254:
	yych = *++cur;
	if (yych == 'r') goto yy257;
	goto yy9;
yy255:
	yych = *++cur;
	if (yych == '2') goto yy258;
	goto yy9;
yy256:
	yych = *++cur;
	if (yych == 'c') goto yy171;
	goto yy9;
yy257:
	yych = *++cur;
	if (yych == 'e') goto yy259;
	goto yy9;
yy258:
	yych = *++cur;
	if (yych == 'c') goto yy191;
	goto yy9;
yy259:
	yych = *++cur;
	if (yych != '2') goto yy9;
	yych = *++cur;
	if (yych == 'c') goto yy216;
	goto yy9;
}
#line 295 "../src/parse/lexer.re"

}

#undef RET_BLOCK

Ret Input::lex_opt_name(std::string& name) {
    tok = cur;

#line 1495 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  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,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128,   0,   0,   0,   0,   0,   0,
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128,   0,   0,   0,   0, 128,
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 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
	};
	mar = cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= ' ') {
		if (yych <= '\f') {
			if (yych <= 0x08) goto yy261;
			if (yych <= '\n') {
				yyt1 = cur;
				goto yy262;
			}
		} else {
			if (yych <= '\r') {
				yyt1 = cur;
				goto yy262;
			}
			if (yych >= ' ') {
				yyt1 = cur;
				goto yy262;
			}
		}
	} else {
		if (yych <= ')') {
			if (yych == '%') {
				yyt1 = cur;
				goto yy263;
			}
		} else {
			if (yych <= '*') {
				yyt1 = cur;
				goto yy265;
			}
			if (yych == ':') goto yy266;
		}
	}
yy261:
#line 303 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_cur(
                "ill-formed start of a block: expected a space, a newline, a colon "
                "followed by a block name, or the end of block"));
    }
#line 1573 "src/parse/lexer.cc"
yy262:
	++cur;
	cur = yyt1;
#line 309 "../src/parse/lexer.re"
	{ name.clear();              return Ret::OK; }
#line 1579 "src/parse/lexer.cc"
yy263:
	yych = *++cur;
	if (yych == '}') goto yy262;
yy264:
	cur = mar;
	goto yy261;
yy265:
	yych = *++cur;
	if (yych == '/') goto yy262;
	goto yy264;
yy266:
	yych = *++cur;
	if (yych <= '^') {
		if (yych <= '@') goto yy264;
		if (yych >= '[') goto yy264;
	} else {
		if (yych == '`') goto yy264;
		if (yych >= '{') goto yy264;
	}
yy267:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy267;
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy264;
			yyt1 = cur;
		} else {
			if (yych != '\r') goto yy264;
			yyt1 = cur;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt1 = cur;
				goto yy268;
			}
			if (yych <= '$') goto yy264;
			yyt1 = cur;
			goto yy269;
		} else {
			if (yych == '*') {
				yyt1 = cur;
				goto yy270;
			}
			goto yy264;
		}
	}
yy268:
	++cur;
	cur = yyt1;
#line 310 "../src/parse/lexer.re"
	{ name.assign(tok + 1, cur); return Ret::OK; }
#line 1634 "src/parse/lexer.cc"
yy269:
	yych = *++cur;
	if (yych == '}') goto yy268;
	goto yy264;
yy270:
	yych = *++cur;
	if (yych == '/') goto yy268;
	goto yy264;
}
#line 311 "../src/parse/lexer.re"

}

Ret Input::lex_name_list(BlockNameList** ptail) {
    BlockNameList** phead = ptail;
loop:
    tok = cur;

#line 1653 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  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,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128,   0,   0,   0,   0,   0,   0,
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128,   0,   0,   0,   0, 128,
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 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
	};
	mar = cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= ' ') {
		if (yych <= '\f') {
			if (yych <= 0x08) goto yy272;
			if (yych <= '\n') {
				yyt1 = cur;
				goto yy273;
			}
		} else {
			if (yych <= '\r') {
				yyt1 = cur;
				goto yy273;
			}
			if (yych >= ' ') {
				yyt1 = cur;
				goto yy273;
			}
		}
	} else {
		if (yych <= ')') {
			if (yych == '%') {
				yyt1 = cur;
				goto yy274;
			}
		} else {
			if (yych <= '*') {
				yyt1 = cur;
				goto yy276;
			}
			if (yych == ':') goto yy277;
		}
	}
yy272:
#line 319 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_cur(
                "ill-formed start of a block: expected a space, a newline, a colon "
                "followed by a list of colon-separated block names, or the end of block"));
    }
#line 1731 "src/parse/lexer.cc"
yy273:
	++cur;
	cur = yyt1;
#line 325 "../src/parse/lexer.re"
	{ *ptail = nullptr; return Ret::OK; }
#line 1737 "src/parse/lexer.cc"
yy274:
	yych = *++cur;
	if (yych == '}') goto yy273;
yy275:
	cur = mar;
	goto yy272;
yy276:
	yych = *++cur;
	if (yych == '/') goto yy273;
	goto yy275;
yy277:
	yych = *++cur;
	if (yych <= '^') {
		if (yych <= '@') goto yy275;
		if (yych >= '[') goto yy275;
	} else {
		if (yych == '`') goto yy275;
		if (yych >= '{') goto yy275;
	}
yy278:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy278;
#line 327 "../src/parse/lexer.re"
	{
        BlockNameList *l = alc.alloct<BlockNameList>(1);
        l->name = newcstr(tok + 1, cur, alc);
        l->next = nullptr;
        *ptail = l;
        ptail = &l->next;

        // Check that the added name is unique.
        for (const BlockNameList *p = *phead; p != l; p = p->next) {
            if (strcmp(p->name, l->name) == 0) {
                RET_FAIL(error_at_cur("duplicate block `%s` on the list", p->name));
            }
        }

        goto loop;
    }
#line 1779 "src/parse/lexer.cc"
}
#line 343 "../src/parse/lexer.re"

}

Ret Input::lex_block_end(Output& out, bool allow_garbage) {
    bool multiline = false;
loop: 
#line 1788 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0, 128,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		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,   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 ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy282;
	if (yych <= '\r') {
		if (yych <= 0x08) goto yy280;
		if (yych <= '\n') goto yy283;
		if (yych >= '\r') goto yy284;
	} else {
		if (yych <= '%') {
			if (yych >= '%') goto yy285;
		} else {
			if (yych == '*') goto yy286;
		}
	}
yy280:
	++cur;
yy281:
#line 349 "../src/parse/lexer.re"
	{
        if (allow_garbage && !is_eof()) goto loop;
        RET_FAIL(error_at_cur(
            "ill-formed block: expected optional whitespaces followed by the end of block"));
    }
#line 1848 "src/parse/lexer.cc"
yy282:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy282;
#line 360 "../src/parse/lexer.re"
	{ goto loop; }
#line 1856 "src/parse/lexer.cc"
yy283:
	++cur;
#line 361 "../src/parse/lexer.re"
	{ next_line(); multiline = true; goto loop; }
#line 1861 "src/parse/lexer.cc"
yy284:
	yych = *++cur;
	if (yych == '\n') goto yy283;
	goto yy281;
yy285:
	yych = *++cur;
	if (yych == '}') goto yy287;
	goto yy281;
yy286:
	yych = *++cur;
	if (yych != '/') goto yy281;
yy287:
	++cur;
#line 354 "../src/parse/lexer.re"
	{
        if (multiline && globopts->line_dirs) {
            out.gen_stmt(code_line_info_input(out.allocator, cur_loc()));
        }
        return Ret::OK;
    }
#line 1882 "src/parse/lexer.cc"
}
#line 362 "../src/parse/lexer.re"

}

Ret Input::lex_special_block(Output& out, CodeKind kind, uint32_t mask) {
    const char* fmt = nullptr, *sep = nullptr;
    BlockNameList* blocks;

    out.gen_raw(tok, ptr, globopts->line_dirs);
    CHECK_RET(lex_name_list(&blocks));

loop: 
#line 1896 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0, 128,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		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,   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 ((lim - cur) < 9) if (!fill(9)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy291;
	if (yych <= '%') {
		if (yych <= '\f') {
			if (yych <= 0x08) goto yy289;
			if (yych <= '\n') goto yy292;
		} else {
			if (yych <= '\r') goto yy293;
			if (yych >= '%') goto yy294;
		}
	} else {
		if (yych <= 'e') {
			if (yych == '*') goto yy295;
		} else {
			if (yych <= 'f') goto yy296;
			if (yych == 's') goto yy297;
		}
	}
yy289:
	++cur;
yy290:
#line 373 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_cur(
            "ill-formed block: expected optional configurations followed by the end of block"));
    }
#line 1960 "src/parse/lexer.cc"
yy291:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy291;
#line 396 "../src/parse/lexer.re"
	{ goto loop; }
#line 1968 "src/parse/lexer.cc"
yy292:
	++cur;
#line 398 "../src/parse/lexer.re"
	{ next_line(); goto loop; }
#line 1973 "src/parse/lexer.cc"
yy293:
	yych = *++cur;
	if (yych == '\n') goto yy292;
	goto yy290;
yy294:
	yych = *++cur;
	if (yych == '}') goto yy298;
	goto yy290;
yy295:
	yych = *++cur;
	if (yych == '/') goto yy298;
	goto yy290;
yy296:
	yych = *(mar = ++cur);
	if (yych == 'o') goto yy299;
	goto yy290;
yy297:
	yych = *(mar = ++cur);
	if (yych == 'e') goto yy301;
	goto yy290;
yy298:
	++cur;
#line 400 "../src/parse/lexer.re"
	{
        if (globopts->line_dirs) out.gen_stmt(code_line_info_output(alc));
        out.gen_stmt(code_fmt(alc, kind, blocks, fmt, sep));
        if (globopts->line_dirs) out.gen_stmt(code_line_info_input(alc, cur_loc()));
        return Ret::OK;
    }
#line 2003 "src/parse/lexer.cc"
yy299:
	yych = *++cur;
	if (yych == 'r') goto yy302;
yy300:
	cur = mar;
	goto yy290;
yy301:
	yych = *++cur;
	if (yych == 'p') goto yy303;
	goto yy300;
yy302:
	yych = *++cur;
	if (yych == 'm') goto yy304;
	goto yy300;
yy303:
	yych = *++cur;
	if (yych == 'a') goto yy305;
	goto yy300;
yy304:
	yych = *++cur;
	if (yych == 'a') goto yy306;
	goto yy300;
yy305:
	yych = *++cur;
	if (yych == 'r') goto yy307;
	goto yy300;
yy306:
	yych = *++cur;
	if (yych == 't') goto yy308;
	goto yy300;
yy307:
	yych = *++cur;
	if (yych == 'a') goto yy309;
	goto yy300;
yy308:
	++cur;
#line 378 "../src/parse/lexer.re"
	{
        if ((mask & DCONF_FORMAT) == 0) {
            RET_FAIL(error_at_cur("unexpected configuration 'format'"));
        }
        CHECK_RET(lex_conf_string_legacy());
        fmt = copystr(tmp_str, alc);
        goto loop;
    }
#line 2049 "src/parse/lexer.cc"
yy309:
	yych = *++cur;
	if (yych != 't') goto yy300;
	yych = *++cur;
	if (yych != 'o') goto yy300;
	yych = *++cur;
	if (yych != 'r') goto yy300;
	++cur;
#line 387 "../src/parse/lexer.re"
	{
        if ((mask & DCONF_SEPARATOR) == 0) {
            RET_FAIL(error_at_cur("unexpected configuration 'separator'"));
        }
        CHECK_RET(lex_conf_string_legacy());
        sep = copystr(tmp_str, alc);
        goto loop;
    }
#line 2067 "src/parse/lexer.cc"
}
#line 406 "../src/parse/lexer.re"

}

#define RET_TOK(t) do { token = t; return Ret::OK; } while(0)

Ret Input::lex_block(RE2C_STYPE* yylval, Ast& ast, int& token) {
    const uint8_t* p, *x, *y;
scan:
    tok = cur;
    location = cur_loc();

#line 2081 "src/parse/lexer.cc"
{
	uint8_t yych;
	unsigned int yyaccept = 0;
	static const unsigned char yybm[256] = {
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 144,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		144, 128,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		224, 224, 224, 224, 224, 224, 224, 224,
		224, 224, 128, 128, 128, 128, 128, 128,
		128, 160, 160, 160, 160, 160, 160, 160,
		160, 160, 160, 160, 160, 160, 160, 160,
		160, 160, 160, 160, 160, 160, 160, 160,
		160, 160, 160, 128,   0, 128, 128, 160,
		128, 160, 160, 160, 160, 160, 160, 160,
		160, 160, 160, 160, 160, 160, 160, 160,
		160, 160, 160, 160, 160, 160, 160, 160,
		160, 160, 160, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128
	};
	if ((lim - cur) < 12) if (!fill(12)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 16) goto yy313;
	if (yych <= '/') {
		if (yych <= '$') {
			if (yych <= '\r') {
				if (yych <= 0x08) goto yy311;
				if (yych <= '\n') goto yy314;
				if (yych >= '\r') goto yy316;
			} else {
				if (yych <= '!') {
					if (yych >= ' ') goto yy317;
				} else {
					if (yych <= '"') goto yy319;
					if (yych <= '#') goto yy320;
					goto yy321;
				}
			}
		} else {
			if (yych <= ')') {
				if (yych <= '&') {
					if (yych <= '%') goto yy322;
				} else {
					if (yych <= '\'') goto yy323;
					if (yych <= '(') goto yy324;
					goto yy325;
				}
			} else {
				if (yych <= '+') {
					if (yych <= '*') goto yy326;
					goto yy325;
				} else {
					if (yych <= '-') goto yy311;
					if (yych <= '.') goto yy327;
					goto yy328;
				}
			}
		}
	} else {
		if (yych <= '[') {
			if (yych <= '=') {
				if (yych <= ':') {
					if (yych <= '9') goto yy329;
					goto yy330;
				} else {
					if (yych <= ';') goto yy325;
					if (yych <= '<') goto yy331;
					goto yy332;
				}
			} else {
				if (yych <= '?') {
					if (yych >= '?') goto yy325;
				} else {
					if (yych <= '@') goto yy320;
					if (yych <= 'Z') goto yy333;
					goto yy335;
				}
			}
		} else {
			if (yych <= 'q') {
				if (yych <= '^') {
					if (yych <= '\\') goto yy325;
				} else {
					if (yych != '`') goto yy333;
				}
			} else {
				if (yych <= 'z') {
					if (yych <= 'r') goto yy336;
					goto yy333;
				} else {
					if (yych <= '{') goto yy337;
					if (yych <= '|') goto yy325;
				}
			}
		}
	}
yy311:
	++cur;
yy312:
#line 569 "../src/parse/lexer.re"
	{
        if (globopts->flex_syntax && globopts->input_encoding == Enc::Type::UTF8) {
            // Try to lex this as a raw UTF-8 code point (not captured by the `name` rule above
            // because it is restricted to alphanumeric ASCII characters and underscore).
            --cur;
            uint32_t c;
            CHECK_RET(lex_cls_chr(c));
            ast.temp_chars.push_back({c, tok_loc()});
            yylval->regexp = ast.str(tok_loc(), false);
            RET_TOK(TOKEN_REGEXP);
        }
        RET_FAIL(error_at_tok("unexpected character: '%c'", *tok));
    }
#line 2212 "src/parse/lexer.cc"
yy313:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 16) goto yy313;
#line 556 "../src/parse/lexer.re"
	{ goto scan; }
#line 2220 "src/parse/lexer.cc"
yy314:
	yyaccept = 0;
	yych = *(mar = ++cur);
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy339;
	} else {
		if (yych <= ' ') goto yy339;
		if (yych == '#') goto yy341;
	}
yy315:
#line 560 "../src/parse/lexer.re"
	{
        next_line();
        if (mode == LexMode::FLEX_NAME) {
            mode = LexMode::NORMAL;
            RET_TOK(TOKEN_FID_END);
        }
        goto scan;
    }
#line 2240 "src/parse/lexer.cc"
yy316:
	yych = *++cur;
	if (yych == '\n') goto yy314;
	goto yy312;
yy317:
	yych = *++cur;
	if (yych <= 'e') {
		if (yych <= '^') {
			if (yych <= '@') goto yy318;
			if (yych <= 'Z') goto yy342;
		} else {
			if (yych == '`') goto yy318;
			if (yych <= 'd') goto yy342;
			goto yy345;
		}
	} else {
		if (yych <= 'p') {
			if (yych == 'i') goto yy346;
			if (yych <= 'o') goto yy342;
			goto yy347;
		} else {
			if (yych == 'u') goto yy348;
			if (yych <= 'z') goto yy342;
		}
	}
yy318:
#line 448 "../src/parse/lexer.re"
	{ RET_TOK(*tok); }
#line 2269 "src/parse/lexer.cc"
yy319:
	++cur;
#line 434 "../src/parse/lexer.re"
	{ CHECK_RET(lex_str(ast, '"',   yylval->regexp)); RET_TOK(TOKEN_REGEXP); }
#line 2274 "src/parse/lexer.cc"
yy320:
	yych = *++cur;
	if (yych <= '^') {
		if (yych <= '@') goto yy312;
		if (yych <= 'Z') goto yy349;
		goto yy312;
	} else {
		if (yych == '`') goto yy312;
		if (yych <= 'z') goto yy349;
		goto yy312;
	}
yy321:
	++cur;
#line 443 "../src/parse/lexer.re"
	{
        yylval->regexp = ast.eof(tok_loc());
        RET_TOK(TOKEN_REGEXP);
    }
#line 2293 "src/parse/lexer.cc"
yy322:
	yych = *++cur;
	if (yych == '}') goto yy351;
	goto yy312;
yy323:
	++cur;
#line 433 "../src/parse/lexer.re"
	{ CHECK_RET(lex_str(ast, '\'',  yylval->regexp)); RET_TOK(TOKEN_REGEXP); }
#line 2302 "src/parse/lexer.cc"
yy324:
	yych = *++cur;
	if (yych == '!') goto yy352;
	goto yy318;
yy325:
	++cur;
	goto yy318;
yy326:
	yych = *++cur;
	if (yych == '/') goto yy351;
	goto yy318;
yy327:
	++cur;
#line 554 "../src/parse/lexer.re"
	{ yylval->regexp = ast.dot(tok_loc()); RET_TOK(TOKEN_REGEXP); }
#line 2318 "src/parse/lexer.cc"
yy328:
	yych = *++cur;
	if (yych == '*') goto yy353;
	if (yych == '/') goto yy354;
	goto yy318;
yy329:
	++cur;
#line 515 "../src/parse/lexer.re"
	{
        if (!globopts->flex_syntax) {
            RET_FAIL(error_at_tok("unexpected character: '%c'", *tok));
        }
        ast.temp_chars.push_back({*tok, tok_loc()});
        yylval->regexp = ast.str(tok_loc(), false);
        RET_TOK(TOKEN_REGEXP);
    }
#line 2335 "src/parse/lexer.cc"
yy330:
	yych = *++cur;
	if (yych == '=') goto yy355;
	goto yy312;
yy331:
	++cur;
#line 426 "../src/parse/lexer.re"
	{ return lex_clist(ast, token); }
#line 2344 "src/parse/lexer.cc"
yy332:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych == '>') goto yy357;
	goto yy318;
yy333:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy334:
	if (yybm[0+yych] & 32) goto yy333;
#line 494 "../src/parse/lexer.re"
	{
        bool yes;
        CHECK_RET(lex_namedef_context_re2c(yes));
        if (!globopts->flex_syntax || yes) {
            yylval->cstr = ast.cstr_local(tok, cur);
            RET_TOK(TOKEN_ID);
        }
        CHECK_RET(lex_namedef_context_flex(yes));
        if (yes) {
            yylval->cstr = ast.cstr_local(tok, cur);
            mode = LexMode::FLEX_NAME;
            RET_TOK(TOKEN_FID);
        }
        // consume one character, otherwise we risk breaking operator precedence in cases like
        // `ab*`: it should be `a(b)*`, not `(ab)*`
        cur = tok + 1;
        ast.temp_chars.push_back({tok[0], tok_loc()});
        yylval->regexp = ast.str(tok_loc(), false);
        RET_TOK(TOKEN_REGEXP);
    }
#line 2377 "src/parse/lexer.cc"
yy335:
	yych = *++cur;
	if (yych == '^') goto yy358;
#line 435 "../src/parse/lexer.re"
	{ CHECK_RET(lex_cls(ast, false, yylval->regexp)); RET_TOK(TOKEN_REGEXP); }
#line 2383 "src/parse/lexer.cc"
yy336:
	yych = *++cur;
	if (yych == 'e') goto yy359;
	goto yy334;
yy337:
	yyaccept = 2;
	yych = *(mar = ++cur);
	if (yybm[0+yych] & 64) goto yy362;
	if (yych <= 'Z') {
		if (yych == ',') goto yy360;
		if (yych >= 'A') goto yy363;
	} else {
		if (yych <= '_') {
			if (yych >= '_') goto yy363;
		} else {
			if (yych <= '`') goto yy338;
			if (yych <= 'z') goto yy363;
		}
	}
yy338:
#line 418 "../src/parse/lexer.re"
	{ CHECK_RET(lex_code_in_braces(yylval, ast)); RET_TOK(TOKEN_CODE); }
#line 2406 "src/parse/lexer.cc"
yy339:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy339;
	} else {
		if (yych <= ' ') goto yy339;
		if (yych == '#') goto yy341;
	}
yy340:
	cur = mar;
	if (yyaccept <= 3) {
		if (yyaccept <= 1) {
			if (yyaccept == 0) goto yy315;
			else goto yy318;
		} else {
			if (yyaccept == 2) goto yy338;
			else goto yy356;
		}
	} else {
		if (yyaccept <= 5) {
			if (yyaccept == 4) goto yy361;
			else goto yy382;
		} else {
			if (yyaccept == 6) goto yy344;
			else goto yy412;
		}
	}
yy341:
	++cur;
	if ((lim - cur) < 5) if (!fill(5)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy341;
		goto yy340;
	} else {
		if (yych <= ' ') goto yy341;
		if (yych == 'l') goto yy364;
		goto yy340;
	}
yy342:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy343:
	if (yych <= 'Z') {
		if (yych <= '/') goto yy344;
		if (yych <= '9') goto yy342;
		if (yych >= 'A') goto yy342;
	} else {
		if (yych <= '_') {
			if (yych >= '_') goto yy342;
		} else {
			if (yych <= '`') goto yy344;
			if (yych <= 'z') goto yy342;
		}
	}
yy344:
#line 552 "../src/parse/lexer.re"
	{ RET_FAIL(error_at_tok("unknown action or directive '%.*s'", int(cur - tok), tok)); }
#line 2468 "src/parse/lexer.cc"
yy345:
	yych = *++cur;
	if (yych == 'n') goto yy365;
	goto yy343;
yy346:
	yych = *++cur;
	if (yych == 'n') goto yy366;
	goto yy343;
yy347:
	yych = *++cur;
	if (yych == 'o') goto yy367;
	if (yych == 'r') goto yy368;
	goto yy343;
yy348:
	yych = *++cur;
	if (yych == 's') goto yy369;
	goto yy343;
yy349:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 'Z') {
		if (yych <= '/') goto yy350;
		if (yych <= '9') goto yy349;
		if (yych >= 'A') goto yy349;
	} else {
		if (yych <= '_') {
			if (yych >= '_') goto yy349;
		} else {
			if (yych <= '`') goto yy350;
			if (yych <= 'z') goto yy349;
		}
	}
yy350:
#line 438 "../src/parse/lexer.re"
	{
        yylval->regexp = ast.tag(tok_loc(), ast.cstr_global(tok + 1, cur), tok[0] == '#');
        RET_TOK(TOKEN_REGEXP);
    }
#line 2508 "src/parse/lexer.cc"
yy351:
	++cur;
#line 431 "../src/parse/lexer.re"
	{ tok = cur; RET_TOK(0); }
#line 2513 "src/parse/lexer.cc"
yy352:
	++cur;
#line 450 "../src/parse/lexer.re"
	{ RET_TOK(TOKEN_LPAREN_NEG); }
#line 2518 "src/parse/lexer.cc"
yy353:
	++cur;
#line 429 "../src/parse/lexer.re"
	{ CHECK_RET(lex_c_comment());   goto scan; }
#line 2523 "src/parse/lexer.cc"
yy354:
	++cur;
#line 428 "../src/parse/lexer.re"
	{ CHECK_RET(lex_cpp_comment()); goto scan; }
#line 2528 "src/parse/lexer.cc"
yy355:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych == '>') goto yy357;
yy356:
#line 419 "../src/parse/lexer.re"
	{ CHECK_RET(lex_code_indented(yylval, ast));  RET_TOK(TOKEN_CODE); }
#line 2536 "src/parse/lexer.cc"
yy357:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '@') {
		if (yych <= '\t') {
			if (yych <= 0x08) goto yy340;
			goto yy357;
		} else {
			if (yych == ' ') goto yy357;
			goto yy340;
		}
	} else {
		if (yych <= '_') {
			if (yych <= 'Z') {
				yyt1 = cur;
				goto yy370;
			}
			if (yych <= '^') goto yy340;
			yyt1 = cur;
			goto yy370;
		} else {
			if (yych <= '`') goto yy340;
			if (yych <= 'z') {
				yyt1 = cur;
				goto yy370;
			}
			goto yy340;
		}
	}
yy358:
	++cur;
#line 436 "../src/parse/lexer.re"
	{ CHECK_RET(lex_cls(ast, true,  yylval->regexp)); RET_TOK(TOKEN_REGEXP); }
#line 2571 "src/parse/lexer.cc"
yy359:
	yych = *++cur;
	if (yych == '2') goto yy372;
	goto yy334;
yy360:
	++cur;
yy361:
#line 479 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_tok(
                "illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"));
    }
#line 2584 "src/parse/lexer.cc"
yy362:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 64) goto yy362;
	if (yych == ',') {
		yyt1 = cur;
		goto yy373;
	}
	if (yych == '}') goto yy374;
	goto yy340;
yy363:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '^') {
		if (yych <= '9') {
			if (yych <= '/') goto yy340;
			goto yy363;
		} else {
			if (yych <= '@') goto yy340;
			if (yych <= 'Z') goto yy363;
			goto yy340;
		}
	} else {
		if (yych <= 'z') {
			if (yych == '`') goto yy340;
			goto yy363;
		} else {
			if (yych == '}') goto yy375;
			goto yy340;
		}
	}
yy364:
	yych = *++cur;
	if (yych == 'i') goto yy376;
	goto yy340;
yy365:
	yych = *++cur;
	if (yych == 't') goto yy377;
	goto yy343;
yy366:
	yych = *++cur;
	if (yych == 'c') goto yy378;
	goto yy343;
yy367:
	yych = *++cur;
	if (yych == 's') goto yy379;
	goto yy343;
yy368:
	yych = *++cur;
	if (yych == 'e') goto yy380;
	goto yy343;
yy369:
	yych = *++cur;
	if (yych == 'e') goto yy381;
	goto yy343;
yy370:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 'Z') {
		if (yych <= '/') goto yy371;
		if (yych <= '9') goto yy370;
		if (yych >= 'A') goto yy370;
	} else {
		if (yych <= '_') {
			if (yych >= '_') goto yy370;
		} else {
			if (yych <= '`') goto yy371;
			if (yych <= 'z') goto yy370;
		}
	}
yy371:
	p = yyt1;
#line 421 "../src/parse/lexer.re"
	{
        yylval->cstr = ast.cstr_global(p, cur);
        RET_TOK(tok[0] == ':' ? TOKEN_CJUMP : TOKEN_CNEXT);
    }
#line 2665 "src/parse/lexer.cc"
yy372:
	yych = *++cur;
	if (yych == 'c') goto yy383;
	goto yy334;
yy373:
	yyaccept = 4;
	yych = *(mar = ++cur);
	if (yych <= '/') goto yy361;
	if (yych <= '9') goto yy384;
	if (yych == '}') goto yy385;
	goto yy361;
yy374:
	++cur;
#line 452 "../src/parse/lexer.re"
	{
        if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval->bounds.min)) {
            RET_FAIL(error_at_tok("repetition count overflow"));
        }
        yylval->bounds.max = yylval->bounds.min;
        RET_TOK(TOKEN_CLOSESIZE);
    }
#line 2687 "src/parse/lexer.cc"
yy375:
	++cur;
#line 484 "../src/parse/lexer.re"
	{
        if (!globopts->flex_syntax) {
            RET_FAIL(error_at_tok("curly braces for names only allowed with -F switch"));
        }
        yylval->cstr = ast.cstr_local(tok + 1, cur - 1);
        RET_TOK(TOKEN_ID);
    }
#line 2698 "src/parse/lexer.cc"
yy376:
	yych = *++cur;
	if (yych == 'n') goto yy386;
	goto yy340;
yy377:
	yych = *++cur;
	if (yych == 'r') goto yy387;
	goto yy343;
yy378:
	yych = *++cur;
	if (yych == 'l') goto yy388;
	goto yy343;
yy379:
	yych = *++cur;
	if (yych == 't') goto yy389;
	goto yy343;
yy380:
	yych = *++cur;
	if (yych == '_') goto yy390;
	goto yy343;
yy381:
	yyaccept = 5;
	yych = *(mar = ++cur);
	if (yych <= 'Z') {
		if (yych <= '9') {
			if (yych >= '0') goto yy342;
		} else {
			if (yych <= ':') goto yy391;
			if (yych >= 'A') goto yy342;
		}
	} else {
		if (yych <= '_') {
			if (yych >= '_') goto yy342;
		} else {
			if (yych <= '`') goto yy382;
			if (yych <= 'z') goto yy342;
		}
	}
yy382:
#line 541 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_tok(
                "ill-formed use directive: expected `!use` followed by a colon, a block name,"
                " optional spaces, a semicolon, and finally a space, a newline, or the end of"
                " block"));
    }
#line 2745 "src/parse/lexer.cc"
yy383:
	yych = *++cur;
	if (yych == ':') goto yy392;
	goto yy334;
yy384:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '/') goto yy340;
	if (yych <= '9') goto yy384;
	if (yych == '}') goto yy393;
	goto yy340;
yy385:
	++cur;
#line 471 "../src/parse/lexer.re"
	{
        if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval->bounds.min)) {
            RET_FAIL(error_at_tok("repetition lower bound overflow"));
        }
        yylval->bounds.max = std::numeric_limits<uint32_t>::max();
        RET_TOK(TOKEN_CLOSESIZE);
    }
#line 2768 "src/parse/lexer.cc"
yy386:
	yych = *++cur;
	if (yych == 'e') goto yy394;
	goto yy340;
yy387:
	yych = *++cur;
	if (yych == 'y') goto yy395;
	goto yy343;
yy388:
	yych = *++cur;
	if (yych == 'u') goto yy396;
	goto yy343;
yy389:
	yych = *++cur;
	if (yych == '_') goto yy397;
	goto yy343;
yy390:
	yych = *++cur;
	if (yych == 'r') goto yy398;
	goto yy343;
yy391:
	yych = *++cur;
	if (yych <= '^') {
		if (yych <= '@') goto yy340;
		if (yych <= 'Z') {
			yyt1 = cur;
			goto yy399;
		}
		goto yy340;
	} else {
		if (yych == '`') goto yy340;
		if (yych <= 'z') {
			yyt1 = cur;
			goto yy399;
		}
		goto yy340;
	}
yy392:
	++cur;
#line 492 "../src/parse/lexer.re"
	{ RET_TOK(TOKEN_CONF); }
#line 2810 "src/parse/lexer.cc"
yy393:
	++cur;
	p = yyt1;
#line 460 "../src/parse/lexer.re"
	{
        if (!s_to_u32_unsafe(tok + 1, p, yylval->bounds.min)) {
            RET_FAIL(error_at_tok("repetition lower bound overflow"));
        } else if (!s_to_u32_unsafe(p + 1, cur - 1, yylval->bounds.max)) {
            RET_FAIL(error_at_tok("repetition upper bound overflow"));
        } else if (yylval->bounds.min > yylval->bounds.max) {
            RET_FAIL(error_at_tok("repetition lower bound exceeds upper bound"));
        }
        RET_TOK(TOKEN_CLOSESIZE);
    }
#line 2825 "src/parse/lexer.cc"
yy394:
	yych = *++cur;
	if (yych <= '0') goto yy401;
	if (yych <= '9') goto yy340;
	goto yy401;
yy395:
	yyaccept = 6;
	yych = *(mar = ++cur);
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy343;
			yyt1 = cur;
			goto yy402;
		} else {
			if (yych == '\r') {
				yyt1 = cur;
				goto yy402;
			}
			goto yy343;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt1 = cur;
				goto yy402;
			}
			if (yych <= '$') goto yy343;
			yyt1 = cur;
			goto yy403;
		} else {
			if (yych == '*') {
				yyt1 = cur;
				goto yy404;
			}
			goto yy343;
		}
	}
yy396:
	yych = *++cur;
	if (yych == 'd') goto yy405;
	goto yy343;
yy397:
	yych = *++cur;
	if (yych == 'r') goto yy406;
	goto yy343;
yy398:
	yych = *++cur;
	if (yych == 'u') goto yy407;
	goto yy343;
yy399:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= ':') {
		if (yych <= 0x1F) {
			if (yych == '\t') {
				yyt2 = cur;
				goto yy408;
			}
			goto yy340;
		} else {
			if (yych <= ' ') {
				yyt2 = cur;
				goto yy408;
			}
			if (yych <= '/') goto yy340;
			if (yych <= '9') goto yy399;
			goto yy340;
		}
	} else {
		if (yych <= '^') {
			if (yych <= ';') {
				yyt2 = cur;
				goto yy409;
			}
			if (yych <= '@') goto yy340;
			if (yych <= 'Z') goto yy399;
			goto yy340;
		} else {
			if (yych == '`') goto yy340;
			if (yych <= 'z') goto yy399;
			goto yy340;
		}
	}
yy400:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy401:
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy400;
		goto yy340;
	} else {
		if (yych <= ' ') goto yy400;
		if (yych <= '0') goto yy340;
		if (yych <= '9') {
			yyt1 = cur;
			goto yy410;
		}
		goto yy340;
	}
yy402:
	++cur;
	cur = yyt1;
#line 548 "../src/parse/lexer.re"
	{ RET_TOK(TOKEN_ENTRY); }
#line 2932 "src/parse/lexer.cc"
yy403:
	yych = *++cur;
	if (yych == '}') goto yy402;
	goto yy340;
yy404:
	yych = *++cur;
	if (yych == '/') goto yy402;
	goto yy340;
yy405:
	yych = *++cur;
	if (yych == 'e') goto yy411;
	goto yy343;
yy406:
	yych = *++cur;
	if (yych == 'u') goto yy413;
	goto yy343;
yy407:
	yych = *++cur;
	if (yych == 'l') goto yy414;
	goto yy343;
yy408:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy408;
		goto yy340;
	} else {
		if (yych <= ' ') goto yy408;
		if (yych != ';') goto yy340;
	}
yy409:
	yych = *++cur;
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy340;
			yyt3 = cur;
			goto yy415;
		} else {
			if (yych == '\r') {
				yyt3 = cur;
				goto yy415;
			}
			goto yy340;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt3 = cur;
				goto yy415;
			}
			if (yych <= '$') goto yy340;
			yyt3 = cur;
			goto yy416;
		} else {
			if (yych == '*') {
				yyt3 = cur;
				goto yy417;
			}
			goto yy340;
		}
	}
yy410:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\r') {
		if (yych <= '\t') {
			if (yych <= 0x08) goto yy340;
			goto yy418;
		} else {
			if (yych <= '\n') goto yy419;
			if (yych <= '\f') goto yy340;
			goto yy420;
		}
	} else {
		if (yych <= ' ') {
			if (yych <= 0x1F) goto yy340;
			goto yy418;
		} else {
			if (yych <= '/') goto yy340;
			if (yych <= '9') goto yy410;
			goto yy340;
		}
	}
yy411:
	yyaccept = 7;
	yych = *(mar = ++cur);
	if (yych <= '9') {
		if (yych <= 0x1F) {
			if (yych == '\t') goto yy421;
		} else {
			if (yych <= ' ') goto yy421;
			if (yych >= '0') goto yy342;
		}
	} else {
		if (yych <= '^') {
			if (yych <= '@') goto yy412;
			if (yych <= 'Z') goto yy342;
		} else {
			if (yych == '`') goto yy412;
			if (yych <= 'z') goto yy342;
		}
	}
yy412:
#line 528 "../src/parse/lexer.re"
	{
        RET_FAIL(error_at_tok(
                "ill-formed include directive: expected `!include` followed by spaces, a"
                " double-quoted file path, optional spaces, a semicolon, and finally a space, a"
                " newline, or the end of block"));
    }
#line 3045 "src/parse/lexer.cc"
yy413:
	yych = *++cur;
	if (yych == 'l') goto yy422;
	goto yy343;
yy414:
	yych = *++cur;
	if (yych == 'e') goto yy423;
	goto yy343;
yy415:
	++cur;
	x = yyt1;
	y = yyt2;
	cur = yyt3;
#line 535 "../src/parse/lexer.re"
	{
        // Save the name of the used block in a temporary buffer (ensure it is empty).
        CHECK(ast.temp_blockname.empty());
        ast.temp_blockname.assign(x, y);
        RET_TOK(TOKEN_BLOCK);
    }
#line 3066 "src/parse/lexer.cc"
yy416:
	yych = *++cur;
	if (yych == '}') goto yy415;
	goto yy340;
yy417:
	yych = *++cur;
	if (yych == '/') goto yy415;
	goto yy340;
yy418:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy418;
		goto yy340;
	} else {
		if (yych <= ' ') goto yy418;
		if (yych == '"') goto yy424;
		goto yy340;
	}
yy419:
	++cur;
	cur = yyt1;
#line 558 "../src/parse/lexer.re"
	{ CHECK_RET(set_sourceline()); RET_TOK(TOKEN_LINE_INFO); }
#line 3092 "src/parse/lexer.cc"
yy420:
	yych = *++cur;
	if (yych == '\n') goto yy419;
	goto yy340;
yy421:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy421;
		goto yy340;
	} else {
		if (yych <= ' ') goto yy421;
		if (yych == '"') {
			yyt1 = cur;
			goto yy425;
		}
		goto yy340;
	}
yy422:
	yych = *++cur;
	if (yych == 'e') goto yy426;
	goto yy343;
yy423:
	yyaccept = 6;
	yych = *(mar = ++cur);
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy343;
			yyt1 = cur;
			goto yy427;
		} else {
			if (yych == '\r') {
				yyt1 = cur;
				goto yy427;
			}
			goto yy343;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt1 = cur;
				goto yy427;
			}
			if (yych <= '$') goto yy343;
			yyt1 = cur;
			goto yy428;
		} else {
			if (yych == '*') {
				yyt1 = cur;
				goto yy429;
			}
			goto yy343;
		}
	}
yy424:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy424;
	if (yych <= '\n') goto yy340;
	if (yych <= '"') goto yy430;
	goto yy431;
yy425:
	++cur;
	if ((lim - cur) < 4) if (!fill(4)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '!') {
		if (yych <= 0x00) goto yy340;
		if (yych == '\n') goto yy340;
		goto yy425;
	} else {
		if (yych <= '"') goto yy432;
		if (yych == '\\') goto yy433;
		goto yy425;
	}
yy426:
	yyaccept = 6;
	yych = *(mar = ++cur);
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy343;
			yyt1 = cur;
			goto yy434;
		} else {
			if (yych == '\r') {
				yyt1 = cur;
				goto yy434;
			}
			goto yy343;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt1 = cur;
				goto yy434;
			}
			if (yych <= '$') goto yy343;
			yyt1 = cur;
			goto yy435;
		} else {
			if (yych == '*') {
				yyt1 = cur;
				goto yy436;
			}
			goto yy343;
		}
	}
yy427:
	++cur;
	cur = yyt1;
#line 549 "../src/parse/lexer.re"
	{ RET_TOK(TOKEN_PRE_RULE); }
#line 3206 "src/parse/lexer.cc"
yy428:
	yych = *++cur;
	if (yych == '}') goto yy427;
	goto yy340;
yy429:
	yych = *++cur;
	if (yych == '/') goto yy427;
	goto yy340;
yy430:
	yych = *++cur;
	if (yych == '\n') goto yy419;
	if (yych == '\r') goto yy420;
	goto yy340;
yy431:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x00) goto yy340;
	if (yych == '\n') goto yy340;
	goto yy424;
yy432:
	yych = *++cur;
	if (yych <= 0x1F) {
		if (yych == '\t') {
			yyt2 = cur;
			goto yy437;
		}
		goto yy340;
	} else {
		if (yych <= ' ') {
			yyt2 = cur;
			goto yy437;
		}
		if (yych == ';') {
			yyt2 = cur;
			goto yy438;
		}
		goto yy340;
	}
yy433:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x00) goto yy340;
	if (yych == '\n') goto yy340;
	goto yy425;
yy434:
	++cur;
	cur = yyt1;
#line 550 "../src/parse/lexer.re"
	{ RET_TOK(TOKEN_POST_RULE); }
#line 3258 "src/parse/lexer.cc"
yy435:
	yych = *++cur;
	if (yych == '}') goto yy434;
	goto yy340;
yy436:
	yych = *++cur;
	if (yych == '/') goto yy434;
	goto yy340;
yy437:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy437;
		goto yy340;
	} else {
		if (yych <= ' ') goto yy437;
		if (yych != ';') goto yy340;
	}
yy438:
	yych = *++cur;
	if (yych <= 0x1F) {
		if (yych <= '\n') {
			if (yych <= 0x08) goto yy340;
			yyt3 = cur;
		} else {
			if (yych != '\r') goto yy340;
			yyt3 = cur;
		}
	} else {
		if (yych <= '%') {
			if (yych <= ' ') {
				yyt3 = cur;
				goto yy439;
			}
			if (yych <= '$') goto yy340;
			yyt3 = cur;
			goto yy440;
		} else {
			if (yych == '*') {
				yyt3 = cur;
				goto yy441;
			}
			goto yy340;
		}
	}
yy439:
	++cur;
	x = yyt1;
	y = yyt2;
	cur = yyt3;
#line 524 "../src/parse/lexer.re"
	{
        CHECK_RET(include(getstr(x + 1, y - 1), tok));
        goto scan;
    }
#line 3315 "src/parse/lexer.cc"
yy440:
	yych = *++cur;
	if (yych == '}') goto yy439;
	goto yy340;
yy441:
	yych = *++cur;
	if (yych == '/') goto yy439;
	goto yy340;
}
#line 582 "../src/parse/lexer.re"

}

#undef RET_TOK

Ret Input::lex_namedef_context_re2c(bool& yes) {

#line 3333 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0, 128,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		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,   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
	};
	mar = cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') {
			yyt1 = cur;
			goto yy444;
		}
	} else {
		if (yych <= ' ') {
			yyt1 = cur;
			goto yy444;
		}
		if (yych == '=') {
			yyt1 = cur;
			goto yy446;
		}
	}
yy443:
#line 590 "../src/parse/lexer.re"
	{ yes = false; return Ret::OK; }
#line 3391 "src/parse/lexer.cc"
yy444:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy444;
	if (yych == '=') goto yy446;
yy445:
	cur = mar;
	goto yy443;
yy446:
	yych = *++cur;
	if (yych == '>') goto yy445;
	++cur;
	cur = yyt1;
#line 589 "../src/parse/lexer.re"
	{ yes = true;  return Ret::OK; }
#line 3408 "src/parse/lexer.cc"
}
#line 591 "../src/parse/lexer.re"

}

Ret Input::lex_namedef_context_flex(bool& yes) {

#line 3416 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0, 128,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		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,   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 (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych == '\t') {
		yyt1 = cur;
		goto yy448;
	}
	if (yych == ' ') {
		yyt1 = cur;
		goto yy448;
	}
#line 598 "../src/parse/lexer.re"
	{ yes = false; return Ret::OK; }
#line 3465 "src/parse/lexer.cc"
yy448:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy448;
	if (yych <= '<') {
		if (yych == ':') goto yy449;
	} else {
		if (yych <= '=') goto yy449;
		if (yych == '{') goto yy449;
	}
	cur = yyt1;
#line 597 "../src/parse/lexer.re"
	{ yes = true;  return Ret::OK; }
#line 3480 "src/parse/lexer.cc"
yy449:
	++cur;
	cur = yyt1;
#line 596 "../src/parse/lexer.re"
	{ yes = false; return Ret::OK; }
#line 3486 "src/parse/lexer.cc"
}
#line 599 "../src/parse/lexer.re"

}

Ret Input::lex_clist(Ast& ast, int& token) {
    token = TOKEN_CLIST;
    std::set<std::string>& cl = ast.temp_condlist;
    // Due to the re2c grammar parser must reduce each condition list before shifing a new one.
    CHECK(cl.empty());

#line 3498 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0, 128,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		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,   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
	};
	goto yy450;
yy451:
	++cur;
yy450:
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy451;
	if (yych <= 0x1F) goto yy452;
	if (yych <= '!') goto yy453;
	if (yych == '>') goto yy454;
yy452:
#line 610 "../src/parse/lexer.re"
	{ goto cond; }
#line 3548 "src/parse/lexer.cc"
yy453:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych == '\t') goto yy453;
	if (yych == ' ') goto yy453;
#line 608 "../src/parse/lexer.re"
	{ token = TOKEN_CPRE_RULE; goto cond; }
#line 3557 "src/parse/lexer.cc"
yy454:
	++cur;
#line 609 "../src/parse/lexer.re"
	{ token = TOKEN_CZERO; goto end; }
#line 3562 "src/parse/lexer.cc"
}
#line 611 "../src/parse/lexer.re"

cond:
    tok = cur;

#line 3569 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  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,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128,   0,   0,   0,   0,   0,   0,
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128,   0,   0,   0,   0, 128,
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 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
	};
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 'Z') {
		if (yych == '*') goto yy457;
		if (yych >= 'A') goto yy458;
	} else {
		if (yych <= '_') {
			if (yych >= '_') goto yy458;
		} else {
			if (yych <= '`') goto yy456;
			if (yych <= 'z') goto yy458;
		}
	}
yy456:
	++cur;
#line 617 "../src/parse/lexer.re"
	{ goto error; }
#line 3623 "src/parse/lexer.cc"
yy457:
	++cur;
#line 616 "../src/parse/lexer.re"
	{ if (!cl.empty()) goto error; cl.insert("*"); goto next; }
#line 3628 "src/parse/lexer.cc"
yy458:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy458;
#line 615 "../src/parse/lexer.re"
	{ cl.insert(getstr(tok, cur)); goto next; }
#line 3636 "src/parse/lexer.cc"
}
#line 618 "../src/parse/lexer.re"

next: 
#line 3641 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0, 128,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		  0,   0,   0,   0,   0,   0,   0,   0,
		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,   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 ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= ' ') {
		if (yych == '\t') goto yy461;
		if (yych >= ' ') goto yy461;
	} else {
		if (yych <= ',') {
			if (yych >= ',') goto yy462;
		} else {
			if (yych == '>') goto yy463;
		}
	}
	++cur;
yy460:
#line 622 "../src/parse/lexer.re"
	{ goto error; }
#line 3694 "src/parse/lexer.cc"
yy461:
	yych = *(mar = ++cur);
	if (yych <= ' ') {
		if (yych == '\t') goto yy464;
		if (yych <= 0x1F) goto yy460;
		goto yy464;
	} else {
		if (yych <= ',') {
			if (yych <= '+') goto yy460;
		} else {
			if (yych == '>') goto yy463;
			goto yy460;
		}
	}
yy462:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy462;
#line 620 "../src/parse/lexer.re"
	{ goto cond; }
#line 3716 "src/parse/lexer.cc"
yy463:
	++cur;
#line 621 "../src/parse/lexer.re"
	{ goto end; }
#line 3721 "src/parse/lexer.cc"
yy464:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= ' ') {
		if (yych == '\t') goto yy464;
		if (yych >= ' ') goto yy464;
	} else {
		if (yych <= ',') {
			if (yych >= ',') goto yy462;
		} else {
			if (yych == '>') goto yy463;
		}
	}
	cur = mar;
	goto yy460;
}
#line 623 "../src/parse/lexer.re"

end:
    // semantic value `yylval` is implicitly passed in temporary condition list
    return Ret::OK;
error:
    cl.clear();
    RET_FAIL(error_at_cur("syntax error in condition list"));
}

Ret Input::process_semact(RE2C_STYPE* yylval, Ast& ast, const uint8_t* p, const uint8_t* q) {
    const char* text = "";
    if (globopts->indentation_sensitive) {
        // Cut off any leading or trailing newlines to make the code uniform.
        while (p <= q && *p == '\n') ++p;
        while (p <= q && *q == '\n') --q;

        if (p <= q) {
            // Split semantic action by newlines (note: last character `*q` is not a newline).
            // Drop blank lines (this simplifies the code below that removes indentation).
            auto is_blank = [](const uint8_t* s, const uint8_t* e) {
                while (s < e && is_space(*s)) ++s;
                return s == e;
            };
            tmp_list.clear();
            for (const uint8_t* s = p; s < q; ++s) {
                if (*s == '\n') {
                    if (!is_blank(p, s)) tmp_list.push_back(std::string(p, s + 1));
                    p = s + 1;
                }
            }
            if (!is_blank(p, q + 1)) tmp_list.push_back(std::string(p, q + 1) + "\n");

            if (!tmp_list.empty()) {
                // Find first line indentation and use it as base indentation.
                const std::string& first = tmp_list[0];
                uint32_t indent = 0;
                while (is_space_nonl(static_cast<uint8_t>(first[indent]))) ++indent;
                std::string indstr = first.substr(0, indent);

                // Cut off base indentation from every line and glue them together.
                tmp_str.clear();
                for (std::string& line: tmp_list) {
                    if (line.compare(0, indent, indstr) == 0) {
                        tmp_str += line.substr(indent, std::string::npos); // remove indent
                    } else {
                        RET_FAIL(error_at_tok("inconsistent indentation in semantic action"));
                    }
                }
                text = copystr(tmp_str, alc);
            }
        }
    } else {
        // copy the entire semantic action verbatim
        text = ast.cstr_global(p, q + 1);
    }

    yylval->semact = ast.sem_act(tok_loc(), text, nullptr, false);
    return Ret::OK;
}

Ret Input::lex_code_indented(RE2C_STYPE* yylval, Ast& ast) {
    tok = cur;
code: 
#line 3803 "src/parse/lexer.cc"
{
	uint8_t yych;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\'') {
		if (yych <= '\r') {
			if (yych == '\n') goto yy467;
			if (yych >= '\r') goto yy468;
		} else {
			if (yych == '"') goto yy469;
			if (yych >= '\'') goto yy469;
		}
	} else {
		if (yych <= '`') {
			if (yych == '/') goto yy470;
			if (yych >= '`') goto yy469;
		} else {
			if (yych <= '{') {
				if (yych >= '{') goto yy471;
			} else {
				if (yych == '}') goto yy471;
			}
		}
	}
	++cur;
yy466:
#line 691 "../src/parse/lexer.re"
	{ goto code; }
#line 3832 "src/parse/lexer.cc"
yy467:
	++cur;
#line 686 "../src/parse/lexer.re"
	{ next_line(); goto indent; }
#line 3837 "src/parse/lexer.cc"
yy468:
	yych = *++cur;
	if (yych == '\n') goto yy467;
	goto yy466;
yy469:
	++cur;
#line 689 "../src/parse/lexer.re"
	{ CHECK_RET(try_lex_literal_in_code(cur[-1])); goto code; }
#line 3846 "src/parse/lexer.cc"
yy470:
	yych = *++cur;
	if (yych == '*') goto yy472;
	if (yych == '/') goto yy473;
	goto yy466;
yy471:
	++cur;
#line 690 "../src/parse/lexer.re"
	{ RET_FAIL(error_at_cur("Curly braces are not allowed after ':='")); }
#line 3856 "src/parse/lexer.cc"
yy472:
	++cur;
#line 688 "../src/parse/lexer.re"
	{ CHECK_RET(lex_c_comment()); goto code; }
#line 3861 "src/parse/lexer.cc"
yy473:
	++cur;
#line 687 "../src/parse/lexer.re"
	{ CHECK_RET(lex_cpp_comment()); goto indent; }
#line 3866 "src/parse/lexer.cc"
}
#line 692 "../src/parse/lexer.re"

indent: 
#line 3871 "src/parse/lexer.cc"
{
	uint8_t yych;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\f') {
		if (yych <= 0x08) goto yy475;
		if (yych <= '\n') goto yy476;
	} else {
		if (yych <= '\r') goto yy476;
		if (yych == ' ') goto yy476;
	}
yy475:
#line 695 "../src/parse/lexer.re"
	{
        const uint8_t* p = tok, *q = cur - 1;
        if (!globopts->indentation_sensitive) {
            while (p <= q && is_space(*p)) ++p;
            while (p <= q && is_space(*q)) --q;
        }
        return process_semact(yylval, ast, p, q);
    }
#line 3893 "src/parse/lexer.cc"
yy476:
	++cur;
	cur -= 1;
#line 694 "../src/parse/lexer.re"
	{ goto code; }
#line 3899 "src/parse/lexer.cc"
}
#line 703 "../src/parse/lexer.re"

}

Ret Input::lex_code_in_braces(RE2C_STYPE* yylval, Ast& ast) {
    uint32_t depth = 1;
code: 
#line 3908 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 160,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		160, 128,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		192, 192, 192, 192, 192, 192, 192, 192,
		192, 192, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128,   0, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128
	};
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\'') {
		if (yych <= '\r') {
			if (yych == '\n') goto yy479;
			if (yych >= '\r') goto yy481;
		} else {
			if (yych == '"') goto yy482;
			if (yych >= '\'') goto yy482;
		}
	} else {
		if (yych <= '`') {
			if (yych == '/') goto yy483;
			if (yych >= '`') goto yy482;
		} else {
			if (yych <= '{') {
				if (yych >= '{') goto yy484;
			} else {
				if (yych == '}') goto yy485;
			}
		}
	}
	++cur;
yy478:
#line 730 "../src/parse/lexer.re"
	{ goto code; }
#line 3971 "src/parse/lexer.cc"
yy479:
	yych = *(mar = ++cur);
	if (yybm[0+yych] & 32) goto yy486;
	if (yych == '#') goto yy488;
yy480:
#line 726 "../src/parse/lexer.re"
	{ next_line(); goto code; }
#line 3979 "src/parse/lexer.cc"
yy481:
	yych = *++cur;
	if (yych == '\n') goto yy479;
	goto yy478;
yy482:
	++cur;
#line 729 "../src/parse/lexer.re"
	{ CHECK_RET(try_lex_literal_in_code(cur[-1])); goto code; }
#line 3988 "src/parse/lexer.cc"
yy483:
	yych = *++cur;
	if (yych == '*') goto yy489;
	if (yych == '/') goto yy490;
	goto yy478;
yy484:
	++cur;
#line 724 "../src/parse/lexer.re"
	{ ++depth; goto code; }
#line 3998 "src/parse/lexer.cc"
yy485:
	++cur;
#line 709 "../src/parse/lexer.re"
	{
        --depth;
        if (depth > 0) goto code;

        const uint8_t* p = tok, *q = cur - 1;
        if (globopts->code_model == CodeModel::REC_FUNC || !globopts->wrap_blocks_in_braces) {
            // Strip curly braces and adjacent whitespace. In rec/func mode it is always safe
            // to do, as the code is in a separate function and won't cause name collisions.
            ++p; --q; // skip '{' and '}'
            while (p <= q && is_space_nonl(*p)) ++p;
            while (p <= q && is_space_nonl(*q)) --q;
        }
        return process_semact(yylval, ast, p, q);
    }
#line 4016 "src/parse/lexer.cc"
yy486:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 32) goto yy486;
	if (yych == '#') goto yy488;
yy487:
	cur = mar;
	goto yy480;
yy488:
	++cur;
	if ((lim - cur) < 5) if (!fill(5)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy488;
		goto yy487;
	} else {
		if (yych <= ' ') goto yy488;
		if (yych == 'l') goto yy491;
		goto yy487;
	}
yy489:
	++cur;
#line 727 "../src/parse/lexer.re"
	{ CHECK_RET(lex_c_comment()); goto code; }
#line 4042 "src/parse/lexer.cc"
yy490:
	++cur;
#line 728 "../src/parse/lexer.re"
	{ CHECK_RET(lex_cpp_comment()); goto code; }
#line 4047 "src/parse/lexer.cc"
yy491:
	yych = *++cur;
	if (yych != 'i') goto yy487;
	yych = *++cur;
	if (yych != 'n') goto yy487;
	yych = *++cur;
	if (yych != 'e') goto yy487;
	yych = *++cur;
	if (yych <= '0') goto yy493;
	if (yych <= '9') goto yy487;
	goto yy493;
yy492:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy493:
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy492;
		goto yy487;
	} else {
		if (yych <= ' ') goto yy492;
		if (yych <= '0') goto yy487;
		if (yych >= ':') goto yy487;
		yyt1 = cur;
	}
yy494:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 64) goto yy494;
	if (yych <= '\f') {
		if (yych <= 0x08) goto yy487;
		if (yych <= '\t') goto yy495;
		if (yych <= '\n') goto yy496;
		goto yy487;
	} else {
		if (yych <= '\r') goto yy497;
		if (yych != ' ') goto yy487;
	}
yy495:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x1F) {
		if (yych == '\t') goto yy495;
		goto yy487;
	} else {
		if (yych <= ' ') goto yy495;
		if (yych == '"') goto yy498;
		goto yy487;
	}
yy496:
	++cur;
	cur = yyt1;
#line 725 "../src/parse/lexer.re"
	{ CHECK_RET(set_sourceline()); goto code; }
#line 4104 "src/parse/lexer.cc"
yy497:
	yych = *++cur;
	if (yych == '\n') goto yy496;
	goto yy487;
yy498:
	++cur;
	if ((lim - cur) < 3) if (!fill(3)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 128) goto yy498;
	if (yych <= '\n') goto yy487;
	if (yych >= '#') goto yy499;
	yych = *++cur;
	if (yych == '\n') goto yy496;
	if (yych == '\r') goto yy497;
	goto yy487;
yy499:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x00) goto yy487;
	if (yych == '\n') goto yy487;
	goto yy498;
}
#line 731 "../src/parse/lexer.re"

}

Ret Input::lex_dqstring_in_code() {
loop: 
#line 4134 "src/parse/lexer.cc"
{
	uint8_t yych;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\r') {
		if (yych == '\n') goto yy502;
		if (yych >= '\r') goto yy503;
	} else {
		if (yych <= '"') {
			if (yych >= '"') goto yy504;
		} else {
			if (yych == '\\') goto yy505;
		}
	}
	++cur;
yy501:
#line 739 "../src/parse/lexer.re"
	{ goto loop; }
#line 4153 "src/parse/lexer.cc"
yy502:
	++cur;
#line 738 "../src/parse/lexer.re"
	{ next_line(); goto loop; }
#line 4158 "src/parse/lexer.cc"
yy503:
	yych = *++cur;
	if (yych == '\n') goto yy502;
	goto yy501;
yy504:
	++cur;
#line 736 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4167 "src/parse/lexer.cc"
yy505:
	yych = *++cur;
	if (yych == '"') goto yy506;
	if (yych != '\\') goto yy501;
yy506:
	++cur;
#line 737 "../src/parse/lexer.re"
	{ goto loop; }
#line 4176 "src/parse/lexer.cc"
}
#line 740 "../src/parse/lexer.re"

}

Ret Input::lex_sqstring_in_code() {
loop: 
#line 4184 "src/parse/lexer.cc"
{
	uint8_t yych;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\r') {
		if (yych == '\n') goto yy509;
		if (yych >= '\r') goto yy510;
	} else {
		if (yych <= '\'') {
			if (yych >= '\'') goto yy511;
		} else {
			if (yych == '\\') goto yy512;
		}
	}
	++cur;
yy508:
#line 748 "../src/parse/lexer.re"
	{ goto loop; }
#line 4203 "src/parse/lexer.cc"
yy509:
	++cur;
#line 747 "../src/parse/lexer.re"
	{ next_line(); goto loop; }
#line 4208 "src/parse/lexer.cc"
yy510:
	yych = *++cur;
	if (yych == '\n') goto yy509;
	goto yy508;
yy511:
	++cur;
#line 745 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4217 "src/parse/lexer.cc"
yy512:
	yych = *++cur;
	if (yych == '\'') goto yy513;
	if (yych != '\\') goto yy508;
yy513:
	++cur;
#line 746 "../src/parse/lexer.re"
	{ goto loop; }
#line 4226 "src/parse/lexer.cc"
}
#line 749 "../src/parse/lexer.re"

}

Ret Input::lex_bqstring_in_code() {
loop: 
#line 4234 "src/parse/lexer.cc"
{
	uint8_t yych;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\f') {
		if (yych == '\n') goto yy516;
	} else {
		if (yych <= '\r') goto yy517;
		if (yych == '`') goto yy518;
	}
	++cur;
yy515:
#line 756 "../src/parse/lexer.re"
	{ goto loop; }
#line 4249 "src/parse/lexer.cc"
yy516:
	++cur;
#line 755 "../src/parse/lexer.re"
	{ next_line(); goto loop; }
#line 4254 "src/parse/lexer.cc"
yy517:
	yych = *++cur;
	if (yych == '\n') goto yy516;
	goto yy515;
yy518:
	++cur;
#line 754 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4263 "src/parse/lexer.cc"
}
#line 757 "../src/parse/lexer.re"

}

// Generalized rule for char literals (covering various languages).
///
// Char literals may contain closing curly brace, e.g. '}'. We must lex all possible forms of
// char literals, otherwise we might erroneously lex closing single quote as the beginning of
// another literal and overlook a real closing brace (e.g. in 'a'}'b' we might recognize '}'
// as a literal).
//
#line 778 "../src/parse/lexer.re"


Ret Input::lex_sqchar_or_standalone_in_code() {

#line 4281 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  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,
		192, 192, 192, 192, 192, 192, 192, 192,
		128, 128,   0,   0,   0,   0,   0,   0,
		  0, 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, 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
	};
	mar = cur;
	if ((lim - cur) < 11) if (!fill(11)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0xDF) {
		if (yych <= '\\') {
			if (yych <= '[') goto yy521;
			goto yy523;
		} else {
			if (yych <= 0x7F) goto yy521;
			if (yych >= 0xC2) goto yy524;
		}
	} else {
		if (yych <= 0xF0) {
			if (yych <= 0xE0) goto yy525;
			if (yych <= 0xEF) goto yy526;
			goto yy527;
		} else {
			if (yych <= 0xF3) goto yy528;
			if (yych <= 0xF4) goto yy529;
		}
	}
yy520:
#line 784 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4342 "src/parse/lexer.cc"
yy521:
	yych = *++cur;
	if (yych == '\'') goto yy530;
yy522:
	cur = mar;
	goto yy520;
yy523:
	yych = *++cur;
	if (yych <= '`') {
		if (yych <= '7') {
			if (yych <= '&') {
				if (yych == '"') goto yy521;
				goto yy522;
			} else {
				if (yych <= '\'') goto yy532;
				if (yych <= '/') goto yy522;
				if (yych <= '0') goto yy533;
				goto yy534;
			}
		} else {
			if (yych <= 'T') {
				if (yych == '?') goto yy521;
				goto yy522;
			} else {
				if (yych <= 'U') goto yy535;
				if (yych == '\\') goto yy521;
				goto yy522;
			}
		}
	} else {
		if (yych <= 'q') {
			if (yych <= 'f') {
				if (yych <= 'b') goto yy521;
				if (yych <= 'e') goto yy522;
				goto yy521;
			} else {
				if (yych <= 'm') goto yy522;
				if (yych <= 'n') goto yy521;
				if (yych <= 'o') goto yy536;
				goto yy522;
			}
		} else {
			if (yych <= 'u') {
				if (yych == 's') goto yy522;
				if (yych <= 't') goto yy521;
				goto yy537;
			} else {
				if (yych <= 'v') goto yy521;
				if (yych == 'x') goto yy538;
				goto yy522;
			}
		}
	}
yy524:
	yych = *++cur;
	if (yych <= 0x7F) goto yy522;
	if (yych <= 0xBF) goto yy521;
	goto yy522;
yy525:
	yych = *++cur;
	if (yych <= 0x9F) goto yy522;
	if (yych <= 0xBF) goto yy524;
	goto yy522;
yy526:
	yych = *++cur;
	if (yych <= 0x7F) goto yy522;
	if (yych <= 0xBF) goto yy524;
	goto yy522;
yy527:
	yych = *++cur;
	if (yych <= 0x8F) goto yy522;
	if (yych <= 0xBF) goto yy526;
	goto yy522;
yy528:
	yych = *++cur;
	if (yych <= 0x7F) goto yy522;
	if (yych <= 0xBF) goto yy526;
	goto yy522;
yy529:
	yych = *++cur;
	if (yych <= 0x7F) goto yy522;
	if (yych <= 0x8F) goto yy526;
	goto yy522;
yy530:
	++cur;
yy531:
#line 783 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4431 "src/parse/lexer.cc"
yy532:
	yych = *++cur;
	if (yych == '\'') goto yy530;
	goto yy531;
yy533:
	yych = *++cur;
	if (yych == '\'') goto yy530;
	if (yych <= '/') goto yy522;
	if (yych <= '7') goto yy539;
	goto yy522;
yy534:
	yych = *++cur;
	if (yych <= '/') goto yy522;
	if (yych <= '7') goto yy539;
	goto yy522;
yy535:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy540;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy540;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy540;
		goto yy522;
	}
yy536:
	yych = *++cur;
	if (yych == '{') goto yy541;
	goto yy522;
yy537:
	yych = *++cur;
	if (yych <= 'F') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy542;
		if (yych <= '@') goto yy522;
		goto yy542;
	} else {
		if (yych <= 'f') {
			if (yych <= '`') goto yy522;
			goto yy542;
		} else {
			if (yych == '{') goto yy543;
			goto yy522;
		}
	}
yy538:
	yych = *++cur;
	if (yych <= 'F') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy544;
		if (yych <= '@') goto yy522;
		goto yy544;
	} else {
		if (yych <= 'f') {
			if (yych <= '`') goto yy522;
			goto yy544;
		} else {
			if (yych == '{') goto yy543;
			goto yy522;
		}
	}
yy539:
	yych = *++cur;
	if (yych <= '/') goto yy522;
	if (yych <= '7') goto yy521;
	goto yy522;
yy540:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy545;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy545;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy545;
		goto yy522;
	}
yy541:
	yych = *++cur;
	if (yybm[0+yych] & 64) goto yy546;
	goto yy522;
yy542:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy547;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy547;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy547;
		goto yy522;
	}
yy543:
	yych = *++cur;
	if (yych == '}') goto yy522;
	goto yy549;
yy544:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy521;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy521;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy521;
		goto yy522;
	}
yy545:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy550;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy550;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy550;
		goto yy522;
	}
yy546:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 64) goto yy546;
	if (yych == '}') goto yy521;
	goto yy522;
yy547:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy544;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy544;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy544;
		goto yy522;
	}
yy548:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy549:
	if (yybm[0+yych] & 128) goto yy548;
	if (yych == '}') goto yy521;
	goto yy522;
yy550:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych >= ':') goto yy522;
	} else {
		if (yych <= 'F') goto yy551;
		if (yych <= '`') goto yy522;
		if (yych >= 'g') goto yy522;
	}
yy551:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy522;
		if (yych <= '9') goto yy542;
		goto yy522;
	} else {
		if (yych <= 'F') goto yy542;
		if (yych <= '`') goto yy522;
		if (yych <= 'f') goto yy542;
		goto yy522;
	}
}
#line 785 "../src/parse/lexer.re"

}

Ret Input::lex_bqchar_or_standalone_in_code() {

#line 4612 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  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,
		192, 192, 192, 192, 192, 192, 192, 192,
		128, 128,   0,   0,   0,   0,   0,   0,
		  0, 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, 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
	};
	mar = cur;
	if ((lim - cur) < 11) if (!fill(11)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0xDF) {
		if (yych <= '\\') {
			if (yych <= '[') goto yy554;
			goto yy556;
		} else {
			if (yych <= 0x7F) goto yy554;
			if (yych >= 0xC2) goto yy557;
		}
	} else {
		if (yych <= 0xF0) {
			if (yych <= 0xE0) goto yy558;
			if (yych <= 0xEF) goto yy559;
			goto yy560;
		} else {
			if (yych <= 0xF3) goto yy561;
			if (yych <= 0xF4) goto yy562;
		}
	}
yy553:
#line 792 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4673 "src/parse/lexer.cc"
yy554:
	yych = *++cur;
	if (yych == '`') goto yy563;
yy555:
	cur = mar;
	goto yy553;
yy556:
	yych = *++cur;
	if (yych <= '`') {
		if (yych <= '7') {
			if (yych <= '&') {
				if (yych == '"') goto yy554;
				goto yy555;
			} else {
				if (yych <= '\'') goto yy554;
				if (yych <= '/') goto yy555;
				if (yych <= '0') goto yy564;
				goto yy565;
			}
		} else {
			if (yych <= 'U') {
				if (yych == '?') goto yy554;
				if (yych <= 'T') goto yy555;
				goto yy566;
			} else {
				if (yych == '\\') goto yy554;
				if (yych <= '_') goto yy555;
				goto yy563;
			}
		}
	} else {
		if (yych <= 'q') {
			if (yych <= 'f') {
				if (yych <= 'b') goto yy554;
				if (yych <= 'e') goto yy555;
				goto yy554;
			} else {
				if (yych <= 'm') goto yy555;
				if (yych <= 'n') goto yy554;
				if (yych <= 'o') goto yy567;
				goto yy555;
			}
		} else {
			if (yych <= 'u') {
				if (yych == 's') goto yy555;
				if (yych <= 't') goto yy554;
				goto yy568;
			} else {
				if (yych <= 'v') goto yy554;
				if (yych == 'x') goto yy569;
				goto yy555;
			}
		}
	}
yy557:
	yych = *++cur;
	if (yych <= 0x7F) goto yy555;
	if (yych <= 0xBF) goto yy554;
	goto yy555;
yy558:
	yych = *++cur;
	if (yych <= 0x9F) goto yy555;
	if (yych <= 0xBF) goto yy557;
	goto yy555;
yy559:
	yych = *++cur;
	if (yych <= 0x7F) goto yy555;
	if (yych <= 0xBF) goto yy557;
	goto yy555;
yy560:
	yych = *++cur;
	if (yych <= 0x8F) goto yy555;
	if (yych <= 0xBF) goto yy559;
	goto yy555;
yy561:
	yych = *++cur;
	if (yych <= 0x7F) goto yy555;
	if (yych <= 0xBF) goto yy559;
	goto yy555;
yy562:
	yych = *++cur;
	if (yych <= 0x7F) goto yy555;
	if (yych <= 0x8F) goto yy559;
	goto yy555;
yy563:
	++cur;
#line 791 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4762 "src/parse/lexer.cc"
yy564:
	yych = *++cur;
	if (yych <= '/') goto yy555;
	if (yych <= '7') goto yy570;
	if (yych == '`') goto yy563;
	goto yy555;
yy565:
	yych = *++cur;
	if (yych <= '/') goto yy555;
	if (yych <= '7') goto yy570;
	goto yy555;
yy566:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy571;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy571;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy571;
		goto yy555;
	}
yy567:
	yych = *++cur;
	if (yych == '{') goto yy572;
	goto yy555;
yy568:
	yych = *++cur;
	if (yych <= 'F') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy573;
		if (yych <= '@') goto yy555;
		goto yy573;
	} else {
		if (yych <= 'f') {
			if (yych <= '`') goto yy555;
			goto yy573;
		} else {
			if (yych == '{') goto yy574;
			goto yy555;
		}
	}
yy569:
	yych = *++cur;
	if (yych <= 'F') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy575;
		if (yych <= '@') goto yy555;
		goto yy575;
	} else {
		if (yych <= 'f') {
			if (yych <= '`') goto yy555;
			goto yy575;
		} else {
			if (yych == '{') goto yy574;
			goto yy555;
		}
	}
yy570:
	yych = *++cur;
	if (yych <= '/') goto yy555;
	if (yych <= '7') goto yy554;
	goto yy555;
yy571:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy576;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy576;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy576;
		goto yy555;
	}
yy572:
	yych = *++cur;
	if (yybm[0+yych] & 64) goto yy577;
	goto yy555;
yy573:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy578;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy578;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy578;
		goto yy555;
	}
yy574:
	yych = *++cur;
	if (yych == '}') goto yy555;
	goto yy580;
yy575:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy554;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy554;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy554;
		goto yy555;
	}
yy576:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy581;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy581;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy581;
		goto yy555;
	}
yy577:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 64) goto yy577;
	if (yych == '}') goto yy554;
	goto yy555;
yy578:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy575;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy575;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy575;
		goto yy555;
	}
yy579:
	++cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy580:
	if (yybm[0+yych] & 128) goto yy579;
	if (yych == '}') goto yy554;
	goto yy555;
yy581:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych >= ':') goto yy555;
	} else {
		if (yych <= 'F') goto yy582;
		if (yych <= '`') goto yy555;
		if (yych >= 'g') goto yy555;
	}
yy582:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy555;
		if (yych <= '9') goto yy573;
		goto yy555;
	} else {
		if (yych <= 'F') goto yy573;
		if (yych <= '`') goto yy555;
		if (yych <= 'f') goto yy573;
		goto yy555;
	}
}
#line 793 "../src/parse/lexer.re"

}

Ret Input::try_lex_literal_in_code(uint8_t quote) {
    // We need to lex string and char literals in code blocks because they may contain closing
    // brace or newline that would otherwise be erroneously lexed as block terminator symbols.
    switch (quote) {
    case '"':
        return lex_dqstring_in_code();
    case '\'':
        return globopts->single_quoted_strings
            ? lex_sqstring_in_code()
            : lex_sqchar_or_standalone_in_code();
    case '`':
        return globopts->backtick_quoted_strings
            ? lex_bqstring_in_code()
            : lex_bqchar_or_standalone_in_code();
    default:
        return Ret::FAIL;
    }
}

Ret Input::lex_c_comment() {
loop: 
#line 4958 "src/parse/lexer.cc"
{
	uint8_t yych;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\f') {
		if (yych == '\n') goto yy585;
	} else {
		if (yych <= '\r') goto yy586;
		if (yych == '*') goto yy587;
	}
	++cur;
yy584:
#line 819 "../src/parse/lexer.re"
	{ goto loop; }
#line 4973 "src/parse/lexer.cc"
yy585:
	++cur;
#line 818 "../src/parse/lexer.re"
	{ next_line(); goto loop; }
#line 4978 "src/parse/lexer.cc"
yy586:
	yych = *++cur;
	if (yych == '\n') goto yy585;
	goto yy584;
yy587:
	yych = *++cur;
	if (yych != '/') goto yy584;
	++cur;
#line 817 "../src/parse/lexer.re"
	{ return Ret::OK; }
#line 4989 "src/parse/lexer.cc"
}
#line 820 "../src/parse/lexer.re"

}

Ret Input::lex_cpp_comment() {
loop: 
#line 4997 "src/parse/lexer.cc"
{
	uint8_t yych;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych == '\n') goto yy590;
	if (yych == '\r') goto yy591;
	++cur;
yy589:
#line 826 "../src/parse/lexer.re"
	{ goto loop; }
#line 5008 "src/parse/lexer.cc"
yy590:
	++cur;
#line 825 "../src/parse/lexer.re"
	{ next_line(); return Ret::OK; }
#line 5013 "src/parse/lexer.cc"
yy591:
	yych = *++cur;
	if (yych == '\n') goto yy590;
	goto yy589;
}
#line 827 "../src/parse/lexer.re"

}

Ret Input::lex_cls(Ast& ast, bool neg, const AstNode*& a) {
    uint32_t u, l;
    const loc_t& loc0 = tok_loc();
    loc_t loc = cur_loc();
fst:
    tok = cur;

#line 5030 "src/parse/lexer.cc"
{
	uint8_t yych;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych == ']') goto yy593;
#line 838 "../src/parse/lexer.re"
	{ CHECK_RET(lex_cls_chr(l)); goto snd; }
#line 5038 "src/parse/lexer.cc"
yy593:
	++cur;
#line 837 "../src/parse/lexer.re"
	{ a = ast.cls(loc0, neg); return Ret::OK; }
#line 5043 "src/parse/lexer.cc"
}
#line 839 "../src/parse/lexer.re"

snd: 
#line 5048 "src/parse/lexer.cc"
{
	uint8_t yych;
	mar = cur;
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych == '-') goto yy596;
yy595:
#line 841 "../src/parse/lexer.re"
	{ u = l; goto add; }
#line 5058 "src/parse/lexer.cc"
yy596:
	yych = *++cur;
	if (yych != ']') goto yy597;
	cur = mar;
	goto yy595;
yy597:
	++cur;
	cur -= 1;
#line 842 "../src/parse/lexer.re"
	{
        CHECK_RET(lex_cls_chr(u));
        if (l > u) {
            msg.warn.swapped_range(loc, l, u);
            std::swap(l, u);
        }
        goto add;
    }
#line 5076 "src/parse/lexer.cc"
}
#line 850 "../src/parse/lexer.re"

add:
    ast.temp_ranges.push_back(AstRange(l, u, loc));
    loc = cur_loc();
    goto fst;
}

Ret Input::lex_cls_chr(uint32_t& c) {
    tok = cur;
    const loc_t& loc = cur_loc();
#line 885 "../src/parse/lexer.re"

    if (globopts->input_encoding == Enc::Type::ASCII) {
        
#line 5093 "src/parse/lexer.cc"
{
	uint8_t yych;
	unsigned int yyaccept = 0;
	if ((lim - cur) < 10) if (!fill(10)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\f') {
		if (yych == '\n') goto yy600;
	} else {
		if (yych <= '\r') goto yy601;
		if (yych == '\\') goto yy602;
	}
	++cur;
yy599:
#line 867 "../src/parse/lexer.re"
	{ c = decode(tok); return Ret::OK; }
#line 5109 "src/parse/lexer.cc"
yy600:
	++cur;
#line 861 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "newline in character class")); }
#line 5114 "src/parse/lexer.cc"
yy601:
	yych = *++cur;
	if (yych == '\n') goto yy600;
	goto yy599;
yy602:
	yych = *++cur;
	if (yych <= '\\') {
		if (yych <= '/') {
			if (yych <= '\f') {
				if (yych <= 0x00) goto yy603;
				if (yych == '\n') goto yy600;
				goto yy604;
			} else {
				if (yych <= '\r') goto yy606;
				if (yych == '-') goto yy607;
				goto yy604;
			}
		} else {
			if (yych <= 'U') {
				if (yych <= '3') goto yy608;
				if (yych <= '7') goto yy610;
				if (yych <= 'T') goto yy604;
				goto yy611;
			} else {
				if (yych == 'X') goto yy613;
				if (yych <= '[') goto yy604;
				goto yy614;
			}
		}
	} else {
		if (yych <= 'n') {
			if (yych <= 'b') {
				if (yych <= ']') goto yy615;
				if (yych <= '`') goto yy604;
				if (yych <= 'a') goto yy616;
				goto yy617;
			} else {
				if (yych == 'f') goto yy618;
				if (yych <= 'm') goto yy604;
				goto yy619;
			}
		} else {
			if (yych <= 't') {
				if (yych == 'r') goto yy620;
				if (yych <= 's') goto yy604;
				goto yy621;
			} else {
				if (yych <= 'v') {
					if (yych <= 'u') goto yy613;
					goto yy622;
				} else {
					if (yych == 'x') goto yy623;
					goto yy604;
				}
			}
		}
	}
yy603:
#line 864 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error in escape sequence")); }
#line 5175 "src/parse/lexer.cc"
yy604:
	++cur;
yy605:
#line 880 "../src/parse/lexer.re"
	{
        msg.warn.useless_escape(loc, tok, cur);
        c = decode(tok + 1);
        return Ret::OK;
    }
#line 5185 "src/parse/lexer.cc"
yy606:
	yych = *++cur;
	if (yych == '\n') goto yy600;
	goto yy605;
yy607:
	++cur;
#line 878 "../src/parse/lexer.re"
	{ c = '-'_u8; return Ret::OK; }
#line 5194 "src/parse/lexer.cc"
yy608:
	yyaccept = 0;
	yych = *(mar = ++cur);
	if (yych <= '/') goto yy609;
	if (yych <= '7') goto yy624;
yy609:
#line 863 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error in octal escape sequence")); }
#line 5203 "src/parse/lexer.cc"
yy610:
	++cur;
	goto yy609;
yy611:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy612;
		if (yych <= '9') goto yy626;
	} else {
		if (yych <= 'F') goto yy626;
		if (yych <= '`') goto yy612;
		if (yych <= 'f') goto yy626;
	}
yy612:
#line 862 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error in hexadecimal escape sequence")); }
#line 5221 "src/parse/lexer.cc"
yy613:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy612;
		if (yych <= '9') goto yy627;
		goto yy612;
	} else {
		if (yych <= 'F') goto yy627;
		if (yych <= '`') goto yy612;
		if (yych <= 'f') goto yy627;
		goto yy612;
	}
yy614:
	++cur;
#line 877 "../src/parse/lexer.re"
	{ c = '\\'_u8; return Ret::OK; }
#line 5239 "src/parse/lexer.cc"
yy615:
	++cur;
#line 879 "../src/parse/lexer.re"
	{ c = ']'_u8; return Ret::OK; }
#line 5244 "src/parse/lexer.cc"
yy616:
	++cur;
#line 870 "../src/parse/lexer.re"
	{ c = '\a'_u8; return Ret::OK; }
#line 5249 "src/parse/lexer.cc"
yy617:
	++cur;
#line 871 "../src/parse/lexer.re"
	{ c = '\b'_u8; return Ret::OK; }
#line 5254 "src/parse/lexer.cc"
yy618:
	++cur;
#line 872 "../src/parse/lexer.re"
	{ c = '\f'_u8; return Ret::OK; }
#line 5259 "src/parse/lexer.cc"
yy619:
	++cur;
#line 873 "../src/parse/lexer.re"
	{ c = '\n'_u8; return Ret::OK; }
#line 5264 "src/parse/lexer.cc"
yy620:
	++cur;
#line 874 "../src/parse/lexer.re"
	{ c = '\r'_u8; return Ret::OK; }
#line 5269 "src/parse/lexer.cc"
yy621:
	++cur;
#line 875 "../src/parse/lexer.re"
	{ c = '\t'_u8; return Ret::OK; }
#line 5274 "src/parse/lexer.cc"
yy622:
	++cur;
#line 876 "../src/parse/lexer.re"
	{ c = '\v'_u8; return Ret::OK; }
#line 5279 "src/parse/lexer.cc"
yy623:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy612;
		if (yych <= '9') goto yy628;
		goto yy612;
	} else {
		if (yych <= 'F') goto yy628;
		if (yych <= '`') goto yy612;
		if (yych <= 'f') goto yy628;
		goto yy612;
	}
yy624:
	yych = *++cur;
	if (yych <= '/') goto yy625;
	if (yych <= '7') goto yy629;
yy625:
	cur = mar;
	if (yyaccept == 0) goto yy609;
	else goto yy612;
yy626:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych <= '9') goto yy630;
		goto yy625;
	} else {
		if (yych <= 'F') goto yy630;
		if (yych <= '`') goto yy625;
		if (yych <= 'f') goto yy630;
		goto yy625;
	}
yy627:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych <= '9') goto yy631;
		goto yy625;
	} else {
		if (yych <= 'F') goto yy631;
		if (yych <= '`') goto yy625;
		if (yych <= 'f') goto yy631;
		goto yy625;
	}
yy628:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych <= '9') goto yy632;
		goto yy625;
	} else {
		if (yych <= 'F') goto yy632;
		if (yych <= '`') goto yy625;
		if (yych <= 'f') goto yy632;
		goto yy625;
	}
yy629:
	++cur;
#line 869 "../src/parse/lexer.re"
	{ c = unesc_oct(tok, cur); return Ret::OK; }
#line 5341 "src/parse/lexer.cc"
yy630:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych <= '9') goto yy633;
		goto yy625;
	} else {
		if (yych <= 'F') goto yy633;
		if (yych <= '`') goto yy625;
		if (yych <= 'f') goto yy633;
		goto yy625;
	}
yy631:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych <= '9') goto yy628;
		goto yy625;
	} else {
		if (yych <= 'F') goto yy628;
		if (yych <= '`') goto yy625;
		if (yych <= 'f') goto yy628;
		goto yy625;
	}
yy632:
	++cur;
#line 868 "../src/parse/lexer.re"
	{ c = unesc_hex(tok, cur); return Ret::OK; }
#line 5370 "src/parse/lexer.cc"
yy633:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych >= ':') goto yy625;
	} else {
		if (yych <= 'F') goto yy634;
		if (yych <= '`') goto yy625;
		if (yych >= 'g') goto yy625;
	}
yy634:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy625;
		if (yych <= '9') goto yy627;
		goto yy625;
	} else {
		if (yych <= 'F') goto yy627;
		if (yych <= '`') goto yy625;
		if (yych <= 'f') goto yy627;
		goto yy625;
	}
}
#line 887 "../src/parse/lexer.re"

    } else {
        
#line 5398 "src/parse/lexer.cc"
{
	uint8_t yych;
	unsigned int yyaccept = 0;
	if ((lim - cur) < 10) if (!fill(10)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x7F) {
		if (yych <= '\f') {
			if (yych == '\n') goto yy638;
		} else {
			if (yych <= '\r') goto yy639;
			if (yych == '\\') goto yy640;
		}
	} else {
		if (yych <= 0xEF) {
			if (yych <= 0xC1) goto yy642;
			if (yych <= 0xDF) goto yy644;
			if (yych <= 0xE0) goto yy645;
			goto yy646;
		} else {
			if (yych <= 0xF0) goto yy647;
			if (yych <= 0xF3) goto yy648;
			if (yych <= 0xF4) goto yy649;
			goto yy642;
		}
	}
yy636:
	++cur;
yy637:
#line 867 "../src/parse/lexer.re"
	{ c = decode(tok); return Ret::OK; }
#line 5429 "src/parse/lexer.cc"
yy638:
	++cur;
#line 861 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "newline in character class")); }
#line 5434 "src/parse/lexer.cc"
yy639:
	yych = *++cur;
	if (yych == '\n') goto yy638;
	goto yy637;
yy640:
	yyaccept = 0;
	yych = *(mar = ++cur);
	if (yych <= 'b') {
		if (yych <= '7') {
			if (yych <= '\r') {
				if (yych <= '\t') {
					if (yych >= 0x01) goto yy650;
				} else {
					if (yych <= '\n') goto yy638;
					if (yych <= '\f') goto yy650;
					goto yy652;
				}
			} else {
				if (yych <= '-') {
					if (yych <= ',') goto yy650;
					goto yy653;
				} else {
					if (yych <= '/') goto yy650;
					if (yych <= '3') goto yy654;
					goto yy656;
				}
			}
		} else {
			if (yych <= '[') {
				if (yych <= 'U') {
					if (yych <= 'T') goto yy650;
					goto yy657;
				} else {
					if (yych == 'X') goto yy659;
					goto yy650;
				}
			} else {
				if (yych <= ']') {
					if (yych <= '\\') goto yy660;
					goto yy661;
				} else {
					if (yych <= '`') goto yy650;
					if (yych <= 'a') goto yy662;
					goto yy663;
				}
			}
		}
	} else {
		if (yych <= 'v') {
			if (yych <= 'q') {
				if (yych <= 'f') {
					if (yych <= 'e') goto yy650;
					goto yy664;
				} else {
					if (yych == 'n') goto yy665;
					goto yy650;
				}
			} else {
				if (yych <= 's') {
					if (yych <= 'r') goto yy666;
					goto yy650;
				} else {
					if (yych <= 't') goto yy667;
					if (yych <= 'u') goto yy659;
					goto yy668;
				}
			}
		} else {
			if (yych <= 0xDF) {
				if (yych <= 'x') {
					if (yych <= 'w') goto yy650;
					goto yy669;
				} else {
					if (yych <= 0x7F) goto yy650;
					if (yych >= 0xC2) goto yy670;
				}
			} else {
				if (yych <= 0xF0) {
					if (yych <= 0xE0) goto yy672;
					if (yych <= 0xEF) goto yy673;
					goto yy674;
				} else {
					if (yych <= 0xF3) goto yy675;
					if (yych <= 0xF4) goto yy676;
				}
			}
		}
	}
yy641:
#line 864 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error in escape sequence")); }
#line 5526 "src/parse/lexer.cc"
yy642:
	++cur;
yy643:
#line 865 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error")); }
#line 5532 "src/parse/lexer.cc"
yy644:
	yych = *++cur;
	if (yych <= 0x7F) goto yy643;
	if (yych <= 0xBF) goto yy636;
	goto yy643;
yy645:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x9F) goto yy643;
	if (yych <= 0xBF) goto yy677;
	goto yy643;
yy646:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x7F) goto yy643;
	if (yych <= 0xBF) goto yy677;
	goto yy643;
yy647:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x8F) goto yy643;
	if (yych <= 0xBF) goto yy678;
	goto yy643;
yy648:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x7F) goto yy643;
	if (yych <= 0xBF) goto yy678;
	goto yy643;
yy649:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x7F) goto yy643;
	if (yych <= 0x8F) goto yy678;
	goto yy643;
yy650:
	++cur;
yy651:
#line 880 "../src/parse/lexer.re"
	{
        msg.warn.useless_escape(loc, tok, cur);
        c = decode(tok + 1);
        return Ret::OK;
    }
#line 5577 "src/parse/lexer.cc"
yy652:
	yych = *++cur;
	if (yych == '\n') goto yy638;
	goto yy651;
yy653:
	++cur;
#line 878 "../src/parse/lexer.re"
	{ c = '-'_u8; return Ret::OK; }
#line 5586 "src/parse/lexer.cc"
yy654:
	yyaccept = 2;
	yych = *(mar = ++cur);
	if (yych <= '/') goto yy655;
	if (yych <= '7') goto yy679;
yy655:
#line 863 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error in octal escape sequence")); }
#line 5595 "src/parse/lexer.cc"
yy656:
	++cur;
	goto yy655;
yy657:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy658;
		if (yych <= '9') goto yy680;
	} else {
		if (yych <= 'F') goto yy680;
		if (yych <= '`') goto yy658;
		if (yych <= 'f') goto yy680;
	}
yy658:
#line 862 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(loc, "syntax error in hexadecimal escape sequence")); }
#line 5613 "src/parse/lexer.cc"
yy659:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy658;
		if (yych <= '9') goto yy681;
		goto yy658;
	} else {
		if (yych <= 'F') goto yy681;
		if (yych <= '`') goto yy658;
		if (yych <= 'f') goto yy681;
		goto yy658;
	}
yy660:
	++cur;
#line 877 "../src/parse/lexer.re"
	{ c = '\\'_u8; return Ret::OK; }
#line 5631 "src/parse/lexer.cc"
yy661:
	++cur;
#line 879 "../src/parse/lexer.re"
	{ c = ']'_u8; return Ret::OK; }
#line 5636 "src/parse/lexer.cc"
yy662:
	++cur;
#line 870 "../src/parse/lexer.re"
	{ c = '\a'_u8; return Ret::OK; }
#line 5641 "src/parse/lexer.cc"
yy663:
	++cur;
#line 871 "../src/parse/lexer.re"
	{ c = '\b'_u8; return Ret::OK; }
#line 5646 "src/parse/lexer.cc"
yy664:
	++cur;
#line 872 "../src/parse/lexer.re"
	{ c = '\f'_u8; return Ret::OK; }
#line 5651 "src/parse/lexer.cc"
yy665:
	++cur;
#line 873 "../src/parse/lexer.re"
	{ c = '\n'_u8; return Ret::OK; }
#line 5656 "src/parse/lexer.cc"
yy666:
	++cur;
#line 874 "../src/parse/lexer.re"
	{ c = '\r'_u8; return Ret::OK; }
#line 5661 "src/parse/lexer.cc"
yy667:
	++cur;
#line 875 "../src/parse/lexer.re"
	{ c = '\t'_u8; return Ret::OK; }
#line 5666 "src/parse/lexer.cc"
yy668:
	++cur;
#line 876 "../src/parse/lexer.re"
	{ c = '\v'_u8; return Ret::OK; }
#line 5671 "src/parse/lexer.cc"
yy669:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy658;
		if (yych <= '9') goto yy682;
		goto yy658;
	} else {
		if (yych <= 'F') goto yy682;
		if (yych <= '`') goto yy658;
		if (yych <= 'f') goto yy682;
		goto yy658;
	}
yy670:
	yych = *++cur;
	if (yych <= 0x7F) goto yy671;
	if (yych <= 0xBF) goto yy650;
yy671:
	cur = mar;
	if (yyaccept <= 1) {
		if (yyaccept == 0) goto yy641;
		else goto yy643;
	} else {
		if (yyaccept == 2) goto yy655;
		else goto yy658;
	}
yy672:
	yych = *++cur;
	if (yych <= 0x9F) goto yy671;
	if (yych <= 0xBF) goto yy670;
	goto yy671;
yy673:
	yych = *++cur;
	if (yych <= 0x7F) goto yy671;
	if (yych <= 0xBF) goto yy670;
	goto yy671;
yy674:
	yych = *++cur;
	if (yych <= 0x8F) goto yy671;
	if (yych <= 0xBF) goto yy673;
	goto yy671;
yy675:
	yych = *++cur;
	if (yych <= 0x7F) goto yy671;
	if (yych <= 0xBF) goto yy673;
	goto yy671;
yy676:
	yych = *++cur;
	if (yych <= 0x7F) goto yy671;
	if (yych <= 0x8F) goto yy673;
	goto yy671;
yy677:
	yych = *++cur;
	if (yych <= 0x7F) goto yy671;
	if (yych <= 0xBF) goto yy636;
	goto yy671;
yy678:
	yych = *++cur;
	if (yych <= 0x7F) goto yy671;
	if (yych <= 0xBF) goto yy677;
	goto yy671;
yy679:
	yych = *++cur;
	if (yych <= '/') goto yy671;
	if (yych <= '7') goto yy683;
	goto yy671;
yy680:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych <= '9') goto yy684;
		goto yy671;
	} else {
		if (yych <= 'F') goto yy684;
		if (yych <= '`') goto yy671;
		if (yych <= 'f') goto yy684;
		goto yy671;
	}
yy681:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych <= '9') goto yy685;
		goto yy671;
	} else {
		if (yych <= 'F') goto yy685;
		if (yych <= '`') goto yy671;
		if (yych <= 'f') goto yy685;
		goto yy671;
	}
yy682:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych <= '9') goto yy686;
		goto yy671;
	} else {
		if (yych <= 'F') goto yy686;
		if (yych <= '`') goto yy671;
		if (yych <= 'f') goto yy686;
		goto yy671;
	}
yy683:
	++cur;
#line 869 "../src/parse/lexer.re"
	{ c = unesc_oct(tok, cur); return Ret::OK; }
#line 5778 "src/parse/lexer.cc"
yy684:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych <= '9') goto yy687;
		goto yy671;
	} else {
		if (yych <= 'F') goto yy687;
		if (yych <= '`') goto yy671;
		if (yych <= 'f') goto yy687;
		goto yy671;
	}
yy685:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych <= '9') goto yy682;
		goto yy671;
	} else {
		if (yych <= 'F') goto yy682;
		if (yych <= '`') goto yy671;
		if (yych <= 'f') goto yy682;
		goto yy671;
	}
yy686:
	++cur;
#line 868 "../src/parse/lexer.re"
	{ c = unesc_hex(tok, cur); return Ret::OK; }
#line 5807 "src/parse/lexer.cc"
yy687:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych >= ':') goto yy671;
	} else {
		if (yych <= 'F') goto yy688;
		if (yych <= '`') goto yy671;
		if (yych >= 'g') goto yy671;
	}
yy688:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy671;
		if (yych <= '9') goto yy681;
		goto yy671;
	} else {
		if (yych <= 'F') goto yy681;
		if (yych <= '`') goto yy671;
		if (yych <= 'f') goto yy681;
		goto yy671;
	}
}
#line 889 "../src/parse/lexer.re"

    }
}

Ret Input::lex_str_chr(uint8_t quote, AstChar& ast, bool& stop) {
    tok = cur;
    stop = false;
    ast.loc = cur_loc();
#line 920 "../src/parse/lexer.re"

    if (globopts->input_encoding == Enc::Type::ASCII) {
        
#line 5844 "src/parse/lexer.cc"
{
	uint8_t yych;
	unsigned int yyaccept = 0;
	if ((lim - cur) < 10) if (!fill(10)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\f') {
		if (yych == '\n') goto yy691;
	} else {
		if (yych <= '\r') goto yy692;
		if (yych == '\\') goto yy693;
	}
	++cur;
yy690:
#line 904 "../src/parse/lexer.re"
	{ ast.chr = decode(tok); stop = (tok[0] == quote); return Ret::OK; }
#line 5860 "src/parse/lexer.cc"
yy691:
	++cur;
#line 898 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "newline in character string")); }
#line 5865 "src/parse/lexer.cc"
yy692:
	yych = *++cur;
	if (yych == '\n') goto yy691;
	goto yy690;
yy693:
	yych = *++cur;
	if (yych <= '`') {
		if (yych <= '3') {
			if (yych <= '\n') {
				if (yych <= 0x00) goto yy694;
				if (yych <= '\t') goto yy695;
				goto yy691;
			} else {
				if (yych == '\r') goto yy697;
				if (yych <= '/') goto yy695;
				goto yy698;
			}
		} else {
			if (yych <= 'W') {
				if (yych <= '7') goto yy700;
				if (yych == 'U') goto yy701;
				goto yy695;
			} else {
				if (yych <= 'X') goto yy703;
				if (yych == '\\') goto yy704;
				goto yy695;
			}
		}
	} else {
		if (yych <= 'q') {
			if (yych <= 'e') {
				if (yych <= 'a') goto yy705;
				if (yych <= 'b') goto yy706;
				goto yy695;
			} else {
				if (yych <= 'f') goto yy707;
				if (yych == 'n') goto yy708;
				goto yy695;
			}
		} else {
			if (yych <= 'u') {
				if (yych <= 'r') goto yy709;
				if (yych <= 's') goto yy695;
				if (yych <= 't') goto yy710;
				goto yy703;
			} else {
				if (yych <= 'v') goto yy711;
				if (yych == 'x') goto yy712;
				goto yy695;
			}
		}
	}
yy694:
#line 901 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error in escape sequence")); }
#line 5921 "src/parse/lexer.cc"
yy695:
	++cur;
yy696:
#line 915 "../src/parse/lexer.re"
	{
        ast.chr = decode(tok + 1);
        if (tok[1] != quote) msg.warn.useless_escape(ast.loc, tok, cur);
        return Ret::OK;
    }
#line 5931 "src/parse/lexer.cc"
yy697:
	yych = *++cur;
	if (yych == '\n') goto yy691;
	goto yy696;
yy698:
	yyaccept = 0;
	yych = *(mar = ++cur);
	if (yych <= '/') goto yy699;
	if (yych <= '7') goto yy713;
yy699:
#line 900 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error in octal escape sequence")); }
#line 5944 "src/parse/lexer.cc"
yy700:
	++cur;
	goto yy699;
yy701:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy702;
		if (yych <= '9') goto yy715;
	} else {
		if (yych <= 'F') goto yy715;
		if (yych <= '`') goto yy702;
		if (yych <= 'f') goto yy715;
	}
yy702:
#line 899 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error in hexadecimal escape sequence")); }
#line 5962 "src/parse/lexer.cc"
yy703:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy702;
		if (yych <= '9') goto yy716;
		goto yy702;
	} else {
		if (yych <= 'F') goto yy716;
		if (yych <= '`') goto yy702;
		if (yych <= 'f') goto yy716;
		goto yy702;
	}
yy704:
	++cur;
#line 914 "../src/parse/lexer.re"
	{ ast.chr = '\\'_u8; return Ret::OK; }
#line 5980 "src/parse/lexer.cc"
yy705:
	++cur;
#line 907 "../src/parse/lexer.re"
	{ ast.chr = '\a'_u8; return Ret::OK; }
#line 5985 "src/parse/lexer.cc"
yy706:
	++cur;
#line 908 "../src/parse/lexer.re"
	{ ast.chr = '\b'_u8; return Ret::OK; }
#line 5990 "src/parse/lexer.cc"
yy707:
	++cur;
#line 909 "../src/parse/lexer.re"
	{ ast.chr = '\f'_u8; return Ret::OK; }
#line 5995 "src/parse/lexer.cc"
yy708:
	++cur;
#line 910 "../src/parse/lexer.re"
	{ ast.chr = '\n'_u8; return Ret::OK; }
#line 6000 "src/parse/lexer.cc"
yy709:
	++cur;
#line 911 "../src/parse/lexer.re"
	{ ast.chr = '\r'_u8; return Ret::OK; }
#line 6005 "src/parse/lexer.cc"
yy710:
	++cur;
#line 912 "../src/parse/lexer.re"
	{ ast.chr = '\t'_u8; return Ret::OK; }
#line 6010 "src/parse/lexer.cc"
yy711:
	++cur;
#line 913 "../src/parse/lexer.re"
	{ ast.chr = '\v'_u8; return Ret::OK; }
#line 6015 "src/parse/lexer.cc"
yy712:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy702;
		if (yych <= '9') goto yy717;
		goto yy702;
	} else {
		if (yych <= 'F') goto yy717;
		if (yych <= '`') goto yy702;
		if (yych <= 'f') goto yy717;
		goto yy702;
	}
yy713:
	yych = *++cur;
	if (yych <= '/') goto yy714;
	if (yych <= '7') goto yy718;
yy714:
	cur = mar;
	if (yyaccept == 0) goto yy699;
	else goto yy702;
yy715:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych <= '9') goto yy719;
		goto yy714;
	} else {
		if (yych <= 'F') goto yy719;
		if (yych <= '`') goto yy714;
		if (yych <= 'f') goto yy719;
		goto yy714;
	}
yy716:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych <= '9') goto yy720;
		goto yy714;
	} else {
		if (yych <= 'F') goto yy720;
		if (yych <= '`') goto yy714;
		if (yych <= 'f') goto yy720;
		goto yy714;
	}
yy717:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych <= '9') goto yy721;
		goto yy714;
	} else {
		if (yych <= 'F') goto yy721;
		if (yych <= '`') goto yy714;
		if (yych <= 'f') goto yy721;
		goto yy714;
	}
yy718:
	++cur;
#line 906 "../src/parse/lexer.re"
	{ ast.chr = unesc_oct(tok, cur); return Ret::OK; }
#line 6077 "src/parse/lexer.cc"
yy719:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych <= '9') goto yy722;
		goto yy714;
	} else {
		if (yych <= 'F') goto yy722;
		if (yych <= '`') goto yy714;
		if (yych <= 'f') goto yy722;
		goto yy714;
	}
yy720:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych <= '9') goto yy717;
		goto yy714;
	} else {
		if (yych <= 'F') goto yy717;
		if (yych <= '`') goto yy714;
		if (yych <= 'f') goto yy717;
		goto yy714;
	}
yy721:
	++cur;
#line 905 "../src/parse/lexer.re"
	{ ast.chr = unesc_hex(tok, cur); return Ret::OK; }
#line 6106 "src/parse/lexer.cc"
yy722:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych >= ':') goto yy714;
	} else {
		if (yych <= 'F') goto yy723;
		if (yych <= '`') goto yy714;
		if (yych >= 'g') goto yy714;
	}
yy723:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy714;
		if (yych <= '9') goto yy716;
		goto yy714;
	} else {
		if (yych <= 'F') goto yy716;
		if (yych <= '`') goto yy714;
		if (yych <= 'f') goto yy716;
		goto yy714;
	}
}
#line 922 "../src/parse/lexer.re"

    } else {
        
#line 6134 "src/parse/lexer.cc"
{
	uint8_t yych;
	unsigned int yyaccept = 0;
	if ((lim - cur) < 10) if (!fill(10)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x7F) {
		if (yych <= '\f') {
			if (yych == '\n') goto yy727;
		} else {
			if (yych <= '\r') goto yy728;
			if (yych == '\\') goto yy729;
		}
	} else {
		if (yych <= 0xEF) {
			if (yych <= 0xC1) goto yy731;
			if (yych <= 0xDF) goto yy733;
			if (yych <= 0xE0) goto yy734;
			goto yy735;
		} else {
			if (yych <= 0xF0) goto yy736;
			if (yych <= 0xF3) goto yy737;
			if (yych <= 0xF4) goto yy738;
			goto yy731;
		}
	}
yy725:
	++cur;
yy726:
#line 904 "../src/parse/lexer.re"
	{ ast.chr = decode(tok); stop = (tok[0] == quote); return Ret::OK; }
#line 6165 "src/parse/lexer.cc"
yy727:
	++cur;
#line 898 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "newline in character string")); }
#line 6170 "src/parse/lexer.cc"
yy728:
	yych = *++cur;
	if (yych == '\n') goto yy727;
	goto yy726;
yy729:
	yyaccept = 0;
	yych = *(mar = ++cur);
	if (yych <= 'f') {
		if (yych <= 'T') {
			if (yych <= '\f') {
				if (yych <= 0x00) goto yy730;
				if (yych == '\n') goto yy727;
				goto yy739;
			} else {
				if (yych <= '/') {
					if (yych <= '\r') goto yy741;
					goto yy739;
				} else {
					if (yych <= '3') goto yy742;
					if (yych <= '7') goto yy744;
					goto yy739;
				}
			}
		} else {
			if (yych <= '\\') {
				if (yych <= 'W') {
					if (yych <= 'U') goto yy745;
					goto yy739;
				} else {
					if (yych <= 'X') goto yy747;
					if (yych <= '[') goto yy739;
					goto yy748;
				}
			} else {
				if (yych <= 'a') {
					if (yych <= '`') goto yy739;
					goto yy749;
				} else {
					if (yych <= 'b') goto yy750;
					if (yych <= 'e') goto yy739;
					goto yy751;
				}
			}
		}
	} else {
		if (yych <= 'w') {
			if (yych <= 'r') {
				if (yych == 'n') goto yy752;
				if (yych <= 'q') goto yy739;
				goto yy753;
			} else {
				if (yych <= 't') {
					if (yych <= 's') goto yy739;
					goto yy754;
				} else {
					if (yych <= 'u') goto yy747;
					if (yych <= 'v') goto yy755;
					goto yy739;
				}
			}
		} else {
			if (yych <= 0xE0) {
				if (yych <= 0x7F) {
					if (yych <= 'x') goto yy756;
					goto yy739;
				} else {
					if (yych <= 0xC1) goto yy730;
					if (yych <= 0xDF) goto yy757;
					goto yy759;
				}
			} else {
				if (yych <= 0xF0) {
					if (yych <= 0xEF) goto yy760;
					goto yy761;
				} else {
					if (yych <= 0xF3) goto yy762;
					if (yych <= 0xF4) goto yy763;
				}
			}
		}
	}
yy730:
#line 901 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error in escape sequence")); }
#line 6255 "src/parse/lexer.cc"
yy731:
	++cur;
yy732:
#line 902 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error")); }
#line 6261 "src/parse/lexer.cc"
yy733:
	yych = *++cur;
	if (yych <= 0x7F) goto yy732;
	if (yych <= 0xBF) goto yy725;
	goto yy732;
yy734:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x9F) goto yy732;
	if (yych <= 0xBF) goto yy764;
	goto yy732;
yy735:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x7F) goto yy732;
	if (yych <= 0xBF) goto yy764;
	goto yy732;
yy736:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x8F) goto yy732;
	if (yych <= 0xBF) goto yy765;
	goto yy732;
yy737:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x7F) goto yy732;
	if (yych <= 0xBF) goto yy765;
	goto yy732;
yy738:
	yyaccept = 1;
	yych = *(mar = ++cur);
	if (yych <= 0x7F) goto yy732;
	if (yych <= 0x8F) goto yy765;
	goto yy732;
yy739:
	++cur;
yy740:
#line 915 "../src/parse/lexer.re"
	{
        ast.chr = decode(tok + 1);
        if (tok[1] != quote) msg.warn.useless_escape(ast.loc, tok, cur);
        return Ret::OK;
    }
#line 6306 "src/parse/lexer.cc"
yy741:
	yych = *++cur;
	if (yych == '\n') goto yy727;
	goto yy740;
yy742:
	yyaccept = 2;
	yych = *(mar = ++cur);
	if (yych <= '/') goto yy743;
	if (yych <= '7') goto yy766;
yy743:
#line 900 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error in octal escape sequence")); }
#line 6319 "src/parse/lexer.cc"
yy744:
	++cur;
	goto yy743;
yy745:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy746;
		if (yych <= '9') goto yy767;
	} else {
		if (yych <= 'F') goto yy767;
		if (yych <= '`') goto yy746;
		if (yych <= 'f') goto yy767;
	}
yy746:
#line 899 "../src/parse/lexer.re"
	{ RET_FAIL(error_at(ast.loc, "syntax error in hexadecimal escape sequence")); }
#line 6337 "src/parse/lexer.cc"
yy747:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy746;
		if (yych <= '9') goto yy768;
		goto yy746;
	} else {
		if (yych <= 'F') goto yy768;
		if (yych <= '`') goto yy746;
		if (yych <= 'f') goto yy768;
		goto yy746;
	}
yy748:
	++cur;
#line 914 "../src/parse/lexer.re"
	{ ast.chr = '\\'_u8; return Ret::OK; }
#line 6355 "src/parse/lexer.cc"
yy749:
	++cur;
#line 907 "../src/parse/lexer.re"
	{ ast.chr = '\a'_u8; return Ret::OK; }
#line 6360 "src/parse/lexer.cc"
yy750:
	++cur;
#line 908 "../src/parse/lexer.re"
	{ ast.chr = '\b'_u8; return Ret::OK; }
#line 6365 "src/parse/lexer.cc"
yy751:
	++cur;
#line 909 "../src/parse/lexer.re"
	{ ast.chr = '\f'_u8; return Ret::OK; }
#line 6370 "src/parse/lexer.cc"
yy752:
	++cur;
#line 910 "../src/parse/lexer.re"
	{ ast.chr = '\n'_u8; return Ret::OK; }
#line 6375 "src/parse/lexer.cc"
yy753:
	++cur;
#line 911 "../src/parse/lexer.re"
	{ ast.chr = '\r'_u8; return Ret::OK; }
#line 6380 "src/parse/lexer.cc"
yy754:
	++cur;
#line 912 "../src/parse/lexer.re"
	{ ast.chr = '\t'_u8; return Ret::OK; }
#line 6385 "src/parse/lexer.cc"
yy755:
	++cur;
#line 913 "../src/parse/lexer.re"
	{ ast.chr = '\v'_u8; return Ret::OK; }
#line 6390 "src/parse/lexer.cc"
yy756:
	yyaccept = 3;
	yych = *(mar = ++cur);
	if (yych <= '@') {
		if (yych <= '/') goto yy746;
		if (yych <= '9') goto yy769;
		goto yy746;
	} else {
		if (yych <= 'F') goto yy769;
		if (yych <= '`') goto yy746;
		if (yych <= 'f') goto yy769;
		goto yy746;
	}
yy757:
	yych = *++cur;
	if (yych <= 0x7F) goto yy758;
	if (yych <= 0xBF) goto yy739;
yy758:
	cur = mar;
	if (yyaccept <= 1) {
		if (yyaccept == 0) goto yy730;
		else goto yy732;
	} else {
		if (yyaccept == 2) goto yy743;
		else goto yy746;
	}
yy759:
	yych = *++cur;
	if (yych <= 0x9F) goto yy758;
	if (yych <= 0xBF) goto yy757;
	goto yy758;
yy760:
	yych = *++cur;
	if (yych <= 0x7F) goto yy758;
	if (yych <= 0xBF) goto yy757;
	goto yy758;
yy761:
	yych = *++cur;
	if (yych <= 0x8F) goto yy758;
	if (yych <= 0xBF) goto yy760;
	goto yy758;
yy762:
	yych = *++cur;
	if (yych <= 0x7F) goto yy758;
	if (yych <= 0xBF) goto yy760;
	goto yy758;
yy763:
	yych = *++cur;
	if (yych <= 0x7F) goto yy758;
	if (yych <= 0x8F) goto yy760;
	goto yy758;
yy764:
	yych = *++cur;
	if (yych <= 0x7F) goto yy758;
	if (yych <= 0xBF) goto yy725;
	goto yy758;
yy765:
	yych = *++cur;
	if (yych <= 0x7F) goto yy758;
	if (yych <= 0xBF) goto yy764;
	goto yy758;
yy766:
	yych = *++cur;
	if (yych <= '/') goto yy758;
	if (yych <= '7') goto yy770;
	goto yy758;
yy767:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych <= '9') goto yy771;
		goto yy758;
	} else {
		if (yych <= 'F') goto yy771;
		if (yych <= '`') goto yy758;
		if (yych <= 'f') goto yy771;
		goto yy758;
	}
yy768:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych <= '9') goto yy772;
		goto yy758;
	} else {
		if (yych <= 'F') goto yy772;
		if (yych <= '`') goto yy758;
		if (yych <= 'f') goto yy772;
		goto yy758;
	}
yy769:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych <= '9') goto yy773;
		goto yy758;
	} else {
		if (yych <= 'F') goto yy773;
		if (yych <= '`') goto yy758;
		if (yych <= 'f') goto yy773;
		goto yy758;
	}
yy770:
	++cur;
#line 906 "../src/parse/lexer.re"
	{ ast.chr = unesc_oct(tok, cur); return Ret::OK; }
#line 6497 "src/parse/lexer.cc"
yy771:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych <= '9') goto yy774;
		goto yy758;
	} else {
		if (yych <= 'F') goto yy774;
		if (yych <= '`') goto yy758;
		if (yych <= 'f') goto yy774;
		goto yy758;
	}
yy772:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych <= '9') goto yy769;
		goto yy758;
	} else {
		if (yych <= 'F') goto yy769;
		if (yych <= '`') goto yy758;
		if (yych <= 'f') goto yy769;
		goto yy758;
	}
yy773:
	++cur;
#line 905 "../src/parse/lexer.re"
	{ ast.chr = unesc_hex(tok, cur); return Ret::OK; }
#line 6526 "src/parse/lexer.cc"
yy774:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych >= ':') goto yy758;
	} else {
		if (yych <= 'F') goto yy775;
		if (yych <= '`') goto yy758;
		if (yych >= 'g') goto yy758;
	}
yy775:
	yych = *++cur;
	if (yych <= '@') {
		if (yych <= '/') goto yy758;
		if (yych <= '9') goto yy768;
		goto yy758;
	} else {
		if (yych <= 'F') goto yy768;
		if (yych <= '`') goto yy758;
		if (yych <= 'f') goto yy768;
		goto yy758;
	}
}
#line 924 "../src/parse/lexer.re"

    }
}

Ret Input::lex_str(Ast& ast, uint8_t quote, const AstNode*& a) {
    const loc_t& loc = tok_loc();
    AstChar c;
    bool stop;
    for (;;) {
        CHECK_RET(lex_str_chr(quote, c, stop));
        if (stop) {
            a = ast.str(loc, quote == '\'');
            return Ret::OK;
        }
        ast.temp_chars.push_back(c);
    }
}

Ret Input::set_sourceline() {
sourceline:
    tok = cur;

#line 6573 "src/parse/lexer.cc"
{
	uint8_t yych;
	static const unsigned char yybm[256] = {
		  0, 128, 128, 128, 128, 128, 128, 128,
		128, 128,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128,   0, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		192, 192, 192, 192, 192, 192, 192, 192,
		192, 192, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128,   0, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128,
		128, 128, 128, 128, 128, 128, 128, 128
	};
	if ((lim - cur) < 2) if (!fill(2)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= '\r') {
		if (yych <= '\t') {
			if (yych >= 0x01) goto yy777;
		} else {
			if (yych <= '\n') goto yy779;
			if (yych <= '\f') goto yy777;
			goto yy780;
		}
	} else {
		if (yych <= '"') {
			if (yych <= '!') goto yy777;
			goto yy781;
		} else {
			if (yych <= '0') goto yy777;
			if (yych <= '9') goto yy782;
			goto yy777;
		}
	}
	++cur;
#line 965 "../src/parse/lexer.re"
	{ --cur; return Ret::OK; }
#line 6633 "src/parse/lexer.cc"
yy777:
	++cur;
yy778:
#line 966 "../src/parse/lexer.re"
	{ goto sourceline; }
#line 6639 "src/parse/lexer.cc"
yy779:
	++cur;
#line 964 "../src/parse/lexer.re"
	{ pos = tok = cur; return Ret::OK; }
#line 6644 "src/parse/lexer.cc"
yy780:
	yych = *++cur;
	if (yych == '\n') goto yy779;
	goto yy778;
yy781:
	yych = *(mar = ++cur);
	if (yych <= 0x00) goto yy778;
	if (yych == '\n') goto yy778;
	goto yy784;
yy782:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yybm[0+yych] & 64) goto yy782;
#line 946 "../src/parse/lexer.re"
	{
        uint32_t l;
        if (!s_to_u32_unsafe(tok, cur, l)) {
            RET_FAIL(error_at_tok("line number overflow"));
        }
        set_line(l);
        goto sourceline;
    }
#line 6668 "src/parse/lexer.cc"
yy783:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
yy784:
	if (yybm[0+yych] & 128) goto yy783;
	if (yych <= '\n') goto yy785;
	if (yych <= '"') goto yy786;
	goto yy787;
yy785:
	cur = mar;
	goto yy778;
yy786:
	++cur;
#line 955 "../src/parse/lexer.re"
	{
        InputFile &in = get_input();
        std::string &name = in.escaped_name;
        name = escape_backslashes(getstr(tok + 1, cur - 1));
        in.fidx = static_cast<uint32_t>(msg.filenames.size());
        msg.filenames.push_back(name);
        goto sourceline;
    }
#line 6692 "src/parse/lexer.cc"
yy787:
	++cur;
	if (lim <= cur) if (!fill(1)) RET_FAIL(error_at_cur("unexpected end of input"));
	yych = *cur;
	if (yych <= 0x00) goto yy785;
	if (yych == '\n') goto yy785;
	goto yy783;
}
#line 967 "../src/parse/lexer.re"

}

#undef YYFILL

} // end namespace re2c
