gzdoom-gles/tools/re2c/src/parse/lex.cc
2016-02-06 20:58:35 -06:00

2861 lines
60 KiB
C++

/* Generated by re2c 0.16 on Thu Jan 21 10:47:47 2016 */
#line 1 "../src/parse/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
#include <string.h>
#include <algorithm>
#include <limits>
#include <string>
#include "src/codegen/output.h"
#include "src/conf/opt.h"
#include "src/conf/warn.h"
#include "src/globals.h"
#include "src/ir/regexp/encoding/enc.h"
#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_null.h"
#include "src/parse/code.h"
#include "src/parse/extop.h"
#include "src/parse/input.h"
#include "src/parse/scanner.h"
#include "src/parse/parser.h" // needed by "y.tab.h"
#include "src/parse/unescape.h"
#include "src/util/range.h"
#include "src/util/s_to_n32_unsafe.h"
#include "y.tab.h"
extern YYSTYPE yylval;
#define YYCTYPE unsigned char
#define YYCURSOR cur
#define YYLIMIT lim
#define YYMARKER ptr
#define YYCTXMARKER ctx
#define YYFILL(n) { fill (n); }
namespace re2c
{
// source code is in ASCII: pointers have type 'char *'
// but re2c makes an implicit assumption that YYCTYPE is unsigned
// when it generates comparisons
#line 42 "../src/parse/lex.re"
#line 62 "../src/parse/lex.re"
Scanner::ParseMode Scanner::echo()
{
bool ignore_eoc = false;
int ignore_cnt = 0;
if (eof && cur == eof) // Catch EOF
{
return Stop;
}
tok = cur;
echo:
#line 62 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
static const unsigned char yybm[] = {
128, 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 ((YYLIMIT - YYCURSOR) < 16) YYFILL(16);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '%') {
if (yych <= '\t') {
if (yych >= 0x01) goto yy4;
} else {
if (yych <= '\n') goto yy6;
if (yych <= '$') goto yy4;
goto yy8;
}
} else {
if (yych <= '*') {
if (yych <= ')') goto yy4;
goto yy9;
} else {
if (yych == '/') goto yy10;
goto yy4;
}
}
++YYCURSOR;
#line 202 "../src/parse/lex.re"
{
if (!ignore_eoc && opts->target == opt_t::CODE)
{
out.wraw(tok, tok_len () - 1);
// -1 so we don't write out the \0
}
if(cur == eof)
{
return Stop;
}
}
#line 132 "src/parse/lex.cc"
yy4:
++YYCURSOR;
yy5:
#line 213 "../src/parse/lex.re"
{
goto echo;
}
#line 140 "src/parse/lex.cc"
yy6:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
goto yy11;
}
if (yych == '#') goto yy14;
yy7:
#line 189 "../src/parse/lex.re"
{
if (ignore_eoc)
{
ignore_cnt++;
}
else if (opts->target == opt_t::CODE)
{
out.wraw(tok, tok_len ());
}
tok = pos = cur;
cline++;
goto echo;
}
#line 163 "src/parse/lex.cc"
yy8:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '{') goto yy16;
goto yy5;
yy9:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy18;
goto yy5;
yy10:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '*') goto yy20;
goto yy5;
yy11:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 32) {
goto yy11;
}
if (yych == '#') goto yy14;
yy13:
YYCURSOR = YYMARKER;
if (yyaccept <= 1) {
if (yyaccept == 0) {
goto yy7;
} else {
goto yy5;
}
} else {
goto yy19;
}
yy14:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy14;
goto yy13;
} else {
if (yych <= ' ') goto yy14;
if (yych == 'l') goto yy21;
goto yy13;
}
yy16:
++YYCURSOR;
#line 78 "../src/parse/lex.re"
{
if (opts->rFlag)
{
fatal("found standard 're2c' block while using -r flag");
}
if (opts->target == opt_t::CODE)
{
const size_t lexeme_len = cur[-1] == '{'
? sizeof ("%{") - 1
: sizeof ("/*!re2c") - 1;
out.wraw(tok, tok_len () - lexeme_len);
}
tok = cur;
return Parse;
}
#line 226 "src/parse/lex.cc"
yy18:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy22;
if (yych == '\r') goto yy24;
yy19:
#line 168 "../src/parse/lex.re"
{
if (ignore_eoc)
{
if (ignore_cnt)
{
out.ws("\n").wline_info (cline, get_fname ().c_str ());
}
ignore_eoc = false;
ignore_cnt = 0;
}
else if (opts->target == opt_t::CODE)
{
out.wraw(tok, tok_len ());
}
tok = pos = cur;
goto echo;
}
#line 251 "src/parse/lex.cc"
yy20:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '!') goto yy25;
goto yy13;
yy21:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'i') goto yy26;
goto yy13;
yy22:
++YYCURSOR;
#line 150 "../src/parse/lex.re"
{
cline++;
if (ignore_eoc)
{
if (ignore_cnt)
{
out.wline_info (cline, get_fname ().c_str ());
}
ignore_eoc = false;
ignore_cnt = 0;
}
else if (opts->target == opt_t::CODE)
{
out.wraw(tok, tok_len ());
}
tok = pos = cur;
goto echo;
}
#line 281 "src/parse/lex.cc"
yy24:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy22;
goto yy13;
yy25:
yych = (YYCTYPE)*++YYCURSOR;
switch (yych) {
case 'g': goto yy27;
case 'i': goto yy28;
case 'm': goto yy29;
case 'r': goto yy30;
case 't': goto yy31;
case 'u': goto yy32;
default: goto yy13;
}
yy26:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy33;
goto yy13;
yy27:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy34;
goto yy13;
yy28:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'g') goto yy35;
goto yy13;
yy29:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'a') goto yy36;
goto yy13;
yy30:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy37;
if (yych == 'u') goto yy38;
goto yy13;
yy31:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'y') goto yy39;
goto yy13;
yy32:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy40;
goto yy13;
yy33:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy41;
goto yy13;
yy34:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy42;
goto yy13;
yy35:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy43;
goto yy13;
yy36:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'x') goto yy44;
goto yy13;
yy37:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy45;
goto yy13;
yy38:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'l') goto yy46;
goto yy13;
yy39:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'p') goto yy47;
goto yy13;
yy40:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy48;
goto yy13;
yy41:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy50;
if (yych <= '9') goto yy13;
goto yy50;
yy42:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy51;
goto yy13;
yy43:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'o') goto yy52;
goto yy13;
yy44:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ':') goto yy53;
goto yy13;
yy45:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy16;
goto yy13;
yy46:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy54;
goto yy13;
yy47:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy55;
goto yy13;
yy48:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ':') goto yy56;
goto yy13;
yy49:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy50:
if (yych <= 0x1F) {
if (yych == '\t') goto yy49;
goto yy13;
} else {
if (yych <= ' ') goto yy49;
if (yych <= '0') goto yy13;
if (yych <= '9') goto yy57;
goto yy13;
}
yy51:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy59;
goto yy13;
yy52:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy60;
goto yy13;
yy53:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy61;
goto yy13;
yy54:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy62;
goto yy13;
yy55:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy63;
goto yy13;
yy56:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy64;
goto yy13;
yy57:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
goto yy57;
}
if (yych <= '\f') {
if (yych <= 0x08) goto yy13;
if (yych <= '\t') goto yy65;
if (yych <= '\n') goto yy67;
goto yy13;
} else {
if (yych <= '\r') goto yy69;
if (yych == ' ') goto yy65;
goto yy13;
}
yy59:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'a') goto yy70;
goto yy13;
yy60:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy71;
goto yy13;
yy61:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy72;
goto yy13;
yy62:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ':') goto yy73;
goto yy13;
yy63:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ':') goto yy74;
goto yy13;
yy64:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy75;
goto yy13;
yy65:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy65;
goto yy13;
} else {
if (yych <= ' ') goto yy65;
if (yych == '"') goto yy76;
goto yy13;
}
yy67:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 185 "../src/parse/lex.re"
{
set_sourceline ();
goto echo;
}
#line 491 "src/parse/lex.cc"
yy69:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy67;
goto yy13;
yy70:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy78;
goto yy13;
yy71:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ':') goto yy79;
goto yy13;
yy72:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy80;
goto yy13;
yy73:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy81;
goto yy13;
yy74:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy82;
goto yy13;
yy75:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy83;
goto yy13;
yy76:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy76;
}
if (yych <= '\n') goto yy13;
if (yych <= '"') goto yy84;
goto yy85;
yy78:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy86;
goto yy13;
yy79:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy87;
goto yy13;
yy80:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy88;
goto yy13;
yy81:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy90;
goto yy13;
yy82:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy91;
goto yy13;
yy83:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy92;
goto yy13;
yy84:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy67;
if (yych == '\r') goto yy69;
goto yy13;
yy85:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy13;
goto yy76;
yy86:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ':') goto yy94;
goto yy13;
yy87:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy95;
goto yy13;
yy88:
++YYCURSOR;
#line 119 "../src/parse/lex.re"
{
if (opts->target != opt_t::DOT)
{
out.wdelay_yymaxfill ();
}
tok = pos = cur;
ignore_eoc = true;
goto echo;
}
#line 585 "src/parse/lex.cc"
yy90:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy96;
goto yy13;
yy91:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy97;
goto yy13;
yy92:
++YYCURSOR;
#line 105 "../src/parse/lex.re"
{
if (!opts->rFlag)
{
fatal("found 'use:re2c' block without -r flag");
}
reuse();
if (opts->target == opt_t::CODE)
{
const size_t lexeme_len = sizeof ("/*!use:re2c") - 1;
out.wraw(tok, tok_len () - lexeme_len);
}
tok = cur;
return Reuse;
}
#line 611 "src/parse/lex.cc"
yy94:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy98;
goto yy13;
yy95:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy99;
goto yy13;
yy96:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy100;
goto yy13;
yy97:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy102;
goto yy13;
yy98:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy104;
goto yy13;
yy99:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy105;
goto yy13;
yy100:
++YYCURSOR;
#line 93 "../src/parse/lex.re"
{
if (opts->rFlag)
{
opts.reset_mapCodeName ();
}
else
{
fatal("found 'rules:re2c' block without -r flag");
}
tok = cur;
return Rules;
}
#line 651 "src/parse/lex.cc"
yy102:
++YYCURSOR;
#line 139 "../src/parse/lex.re"
{
tok = pos = cur;
ignore_eoc = true;
if (opts->target != opt_t::DOT)
{
out.wdelay_line_info ().ws("\n")
.wdelay_types ().ws("\n")
.wline_info (cline, get_fname ().c_str ());
}
goto echo;
}
#line 666 "src/parse/lex.cc"
yy104:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy107;
goto yy13;
yy105:
++YYCURSOR;
#line 134 "../src/parse/lex.re"
{
tok = pos = cur;
ignore_eoc = true;
goto echo;
}
#line 679 "src/parse/lex.cc"
yy107:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy13;
++YYCURSOR;
#line 128 "../src/parse/lex.re"
{
tok = pos = cur;
out.wdelay_state_goto (opts->topIndent);
ignore_eoc = true;
goto echo;
}
#line 691 "src/parse/lex.cc"
}
#line 216 "../src/parse/lex.re"
}
int Scanner::scan()
{
uint32_t depth;
scan:
tchar = cur - pos;
tline = cline;
tok = cur;
switch (lexer_state)
{
case LEX_NORMAL: goto start;
case LEX_FLEX_NAME: goto flex_name;
}
start:
#line 713 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
static const unsigned char yybm[] = {
128, 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 ((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 16) {
goto yy114;
}
if (yych <= '9') {
if (yych <= '&') {
if (yych <= '\r') {
if (yych <= 0x08) goto yy112;
if (yych <= '\n') goto yy117;
if (yych >= '\r') goto yy119;
} else {
if (yych <= '"') {
if (yych >= '"') goto yy120;
} else {
if (yych == '%') goto yy122;
}
}
} else {
if (yych <= '+') {
if (yych <= '\'') goto yy123;
if (yych <= ')') goto yy125;
if (yych <= '*') goto yy127;
goto yy129;
} else {
if (yych <= '-') {
if (yych <= ',') goto yy125;
} else {
if (yych <= '.') goto yy131;
if (yych <= '/') goto yy133;
goto yy134;
}
}
}
} else {
if (yych <= '\\') {
if (yych <= '>') {
if (yych <= ':') goto yy135;
if (yych == '<') goto yy136;
goto yy125;
} else {
if (yych <= '@') {
if (yych <= '?') goto yy129;
} else {
if (yych <= 'Z') goto yy134;
if (yych <= '[') goto yy137;
goto yy125;
}
}
} else {
if (yych <= 'q') {
if (yych == '_') goto yy134;
if (yych >= 'a') goto yy134;
} else {
if (yych <= 'z') {
if (yych <= 'r') goto yy139;
goto yy134;
} else {
if (yych <= '{') goto yy140;
if (yych <= '|') goto yy125;
}
}
}
}
yy112:
++YYCURSOR;
yy113:
#line 388 "../src/parse/lex.re"
{
fatalf("unexpected character: '%c'", *tok);
goto scan;
}
#line 823 "src/parse/lex.cc"
yy114:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 16) {
goto yy114;
}
#line 372 "../src/parse/lex.re"
{
goto scan;
}
#line 835 "src/parse/lex.cc"
yy117:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= 0x1F) {
if (yych == '\t') goto yy142;
} else {
if (yych <= ' ') goto yy142;
if (yych == '#') goto yy145;
}
yy118:
#line 381 "../src/parse/lex.re"
{
if (cur == eof) return 0;
pos = cur;
cline++;
goto scan;
}
#line 853 "src/parse/lex.cc"
yy119:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy117;
goto yy113;
yy120:
++YYCURSOR;
#line 265 "../src/parse/lex.re"
{ yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; }
#line 862 "src/parse/lex.cc"
yy122:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '}') goto yy147;
goto yy113;
yy123:
++YYCURSOR;
#line 264 "../src/parse/lex.re"
{ yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; }
#line 871 "src/parse/lex.cc"
yy125:
++YYCURSOR;
yy126:
#line 275 "../src/parse/lex.re"
{
return *tok;
}
#line 879 "src/parse/lex.cc"
yy127:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy147;
#line 279 "../src/parse/lex.re"
{
yylval.op = *tok;
return TOKEN_STAR;
}
#line 888 "src/parse/lex.cc"
yy129:
++YYCURSOR;
#line 283 "../src/parse/lex.re"
{
yylval.op = *tok;
return TOKEN_CLOSE;
}
#line 896 "src/parse/lex.cc"
yy131:
++YYCURSOR;
#line 367 "../src/parse/lex.re"
{
yylval.regexp = mkDot();
return TOKEN_REGEXP;
}
#line 904 "src/parse/lex.cc"
yy133:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy149;
if (yych == '/') goto yy151;
goto yy126;
yy134:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
goto yy159;
yy135:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
if (yych == '=') goto yy160;
goto yy113;
yy136:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '!') goto yy162;
if (yych == '>') goto yy164;
goto yy126;
yy137:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy165;
#line 266 "../src/parse/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
#line 930 "src/parse/lex.cc"
yy139:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
if (yych == 'e') goto yy167;
goto yy159;
yy140:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 64) {
goto yy170;
}
if (yych <= 'Z') {
if (yych == ',') goto yy168;
if (yych >= 'A') goto yy172;
} else {
if (yych <= '_') {
if (yych >= '_') goto yy172;
} else {
if (yych <= '`') goto yy141;
if (yych <= 'z') goto yy172;
}
}
yy141:
#line 235 "../src/parse/lex.re"
{
depth = 1;
goto code;
}
#line 959 "src/parse/lex.cc"
yy142:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy142;
} else {
if (yych <= ' ') goto yy142;
if (yych == '#') goto yy145;
}
yy144:
YYCURSOR = YYMARKER;
if (yyaccept <= 1) {
if (yyaccept == 0) {
goto yy118;
} else {
goto yy126;
}
} else {
if (yyaccept == 2) {
goto yy141;
} else {
goto yy169;
}
}
yy145:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy145;
goto yy144;
} else {
if (yych <= ' ') goto yy145;
if (yych == 'l') goto yy174;
goto yy144;
}
yy147:
++YYCURSOR;
#line 259 "../src/parse/lex.re"
{
tok = cur;
return 0;
}
#line 1004 "src/parse/lex.cc"
yy149:
++YYCURSOR;
#line 253 "../src/parse/lex.re"
{
depth = 1;
goto comment;
}
#line 1012 "src/parse/lex.cc"
yy151:
++YYCURSOR;
#line 250 "../src/parse/lex.re"
{
goto nextLine;
}
#line 1019 "src/parse/lex.cc"
yy153:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 351 "../src/parse/lex.re"
{
if (!opts->FFlag) {
yylval.str = new std::string (tok, tok_len());
return TOKEN_ID;
} else {
RegExp *r = NULL;
const bool casing = opts->bCaseInsensitive || opts->bCaseInverted;
for (char *s = tok; s < cur; ++s) {
const uint32_t c = static_cast<uint8_t>(*s);
r = doCat(r, casing ? ichr(c) : schr(c));
}
yylval.regexp = r ? r : new NullOp;
return TOKEN_REGEXP;
}
}
#line 1039 "src/parse/lex.cc"
yy155:
yych = (YYCTYPE)*++YYCURSOR;
goto yy178;
yy156:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 346 "../src/parse/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
return TOKEN_ID;
}
#line 1051 "src/parse/lex.cc"
yy158:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy159:
if (yybm[0+yych] & 32) {
goto yy158;
}
if (yych <= ' ') {
if (yych == '\t') goto yy155;
if (yych <= 0x1F) goto yy153;
goto yy155;
} else {
if (yych <= ',') {
if (yych <= '+') goto yy153;
goto yy156;
} else {
if (yych <= '<') goto yy153;
if (yych <= '>') goto yy156;
goto yy153;
}
}
yy160:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy179;
#line 244 "../src/parse/lex.re"
{
tok += 2; /* skip ":=" */
depth = 0;
goto code;
}
#line 1084 "src/parse/lex.cc"
yy162:
++YYCURSOR;
#line 272 "../src/parse/lex.re"
{
return TOKEN_SETUP;
}
#line 1091 "src/parse/lex.cc"
yy164:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
goto yy182;
yy165:
++YYCURSOR;
#line 267 "../src/parse/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
#line 1100 "src/parse/lex.cc"
yy167:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
if (yych == '2') goto yy187;
goto yy159;
yy168:
++YYCURSOR;
yy169:
#line 319 "../src/parse/lex.re"
{
fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
#line 1113 "src/parse/lex.cc"
yy170:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
goto yy170;
}
if (yych <= '^') {
if (yych <= ',') {
if (yych <= '+') goto yy144;
goto yy188;
} else {
if (yych <= '@') goto yy144;
if (yych >= '[') goto yy144;
}
} else {
if (yych <= 'z') {
if (yych == '`') goto yy144;
} else {
if (yych == '}') goto yy189;
goto yy144;
}
}
yy172:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '^') {
if (yych <= '9') {
if (yych <= '/') goto yy144;
goto yy172;
} else {
if (yych <= '@') goto yy144;
if (yych <= 'Z') goto yy172;
goto yy144;
}
} else {
if (yych <= 'z') {
if (yych == '`') goto yy144;
goto yy172;
} else {
if (yych == '}') goto yy191;
goto yy144;
}
}
yy174:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'i') goto yy193;
goto yy144;
yy175:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 333 "../src/parse/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
if (opts->FFlag)
{
lexer_state = LEX_FLEX_NAME;
return TOKEN_FID;
}
else
{
return TOKEN_ID;
}
}
#line 1179 "src/parse/lex.cc"
yy177:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
yy178:
if (yych <= ' ') {
if (yych == '\t') goto yy177;
if (yych <= 0x1F) goto yy175;
goto yy177;
} else {
if (yych <= ',') {
if (yych <= '+') goto yy175;
goto yy156;
} else {
if (yych <= '<') goto yy175;
if (yych <= '>') goto yy156;
goto yy175;
}
}
yy179:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 240 "../src/parse/lex.re"
{
return *tok;
}
#line 1206 "src/parse/lex.cc"
yy181:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
yy182:
if (yych <= '9') {
if (yych <= '\t') {
if (yych <= 0x08) goto yy144;
goto yy181;
} else {
if (yych == ' ') goto yy181;
goto yy144;
}
} else {
if (yych <= '=') {
if (yych <= ':') goto yy183;
if (yych <= '<') goto yy144;
goto yy184;
} else {
if (yych == '{') goto yy185;
goto yy144;
}
}
yy183:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '=') goto yy185;
goto yy144;
yy184:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '>') goto yy144;
yy185:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 269 "../src/parse/lex.re"
{
return TOKEN_NOCOND;
}
#line 1244 "src/parse/lex.cc"
yy187:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
if (yych == 'c') goto yy194;
goto yy159;
yy188:
yyaccept = 3;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy169;
if (yych <= '9') goto yy195;
if (yych == '}') goto yy197;
goto yy169;
yy189:
++YYCURSOR;
#line 288 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min))
{
fatal ("repetition count overflow");
}
yylval.extop.max = yylval.extop.min;
return TOKEN_CLOSESIZE;
}
#line 1268 "src/parse/lex.cc"
yy191:
++YYCURSOR;
#line 323 "../src/parse/lex.re"
{
if (!opts->FFlag) {
fatal("curly braces for names only allowed with -F switch");
}
yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces
return TOKEN_ID;
}
#line 1279 "src/parse/lex.cc"
yy193:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy199;
goto yy144;
yy194:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
if (yych == ':') goto yy200;
goto yy159;
yy195:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '/') goto yy144;
if (yych <= '9') goto yy195;
if (yych == '}') goto yy202;
goto yy144;
yy197:
++YYCURSOR;
#line 310 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min))
{
fatal ("repetition lower bound overflow");
}
yylval.extop.max = std::numeric_limits<uint32_t>::max();
return TOKEN_CLOSESIZE;
}
#line 1308 "src/parse/lex.cc"
yy199:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy204;
goto yy144;
yy200:
++YYCURSOR;
#line 331 "../src/parse/lex.re"
{ lex_conf (); return TOKEN_CONF; }
#line 1317 "src/parse/lex.cc"
yy202:
++YYCURSOR;
#line 297 "../src/parse/lex.re"
{
const char * p = strchr (tok, ',');
if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min))
{
fatal ("repetition lower bound overflow");
}
if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.extop.max))
{
fatal ("repetition upper bound overflow");
}
return TOKEN_CLOSESIZE;
}
#line 1333 "src/parse/lex.cc"
yy204:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy206;
if (yych <= '9') goto yy144;
goto yy206;
yy205:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy206:
if (yych <= 0x1F) {
if (yych == '\t') goto yy205;
goto yy144;
} else {
if (yych <= ' ') goto yy205;
if (yych <= '0') goto yy144;
if (yych >= ':') goto yy144;
}
yy207:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '\r') {
if (yych <= '\t') {
if (yych <= 0x08) goto yy144;
} else {
if (yych <= '\n') goto yy211;
if (yych <= '\f') goto yy144;
goto yy213;
}
} else {
if (yych <= ' ') {
if (yych <= 0x1F) goto yy144;
} else {
if (yych <= '/') goto yy144;
if (yych <= '9') goto yy207;
goto yy144;
}
}
yy209:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy209;
goto yy144;
} else {
if (yych <= ' ') goto yy209;
if (yych == '"') goto yy214;
goto yy144;
}
yy211:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 376 "../src/parse/lex.re"
{
set_sourceline ();
goto scan;
}
#line 1394 "src/parse/lex.cc"
yy213:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy211;
goto yy144;
yy214:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy214;
}
if (yych <= '\n') goto yy144;
if (yych >= '#') goto yy217;
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy211;
if (yych == '\r') goto yy213;
goto yy144;
yy217:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy144;
goto yy214;
}
#line 392 "../src/parse/lex.re"
flex_name:
#line 1424 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy222;
if (yych == '\r') goto yy224;
++YYCURSOR;
yy221:
#line 403 "../src/parse/lex.re"
{
YYCURSOR = tok;
goto start;
}
#line 1438 "src/parse/lex.cc"
yy222:
++YYCURSOR;
#line 397 "../src/parse/lex.re"
{
YYCURSOR = tok;
lexer_state = LEX_NORMAL;
return TOKEN_FID_END;
}
#line 1447 "src/parse/lex.cc"
yy224:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy222;
goto yy221;
}
#line 407 "../src/parse/lex.re"
code:
#line 1458 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
static const unsigned char yybm[] = {
96, 96, 96, 96, 96, 96, 96, 96,
96, 112, 0, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
112, 96, 64, 96, 96, 96, 96, 32,
96, 96, 96, 96, 96, 96, 96, 96,
224, 224, 224, 224, 224, 224, 224, 224,
224, 224, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 0, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96,
};
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '&') {
if (yych <= '\n') {
if (yych <= 0x00) goto yy227;
if (yych <= '\t') goto yy229;
goto yy231;
} else {
if (yych == '"') goto yy233;
goto yy229;
}
} else {
if (yych <= '{') {
if (yych <= '\'') goto yy234;
if (yych <= 'z') goto yy229;
goto yy235;
} else {
if (yych == '}') goto yy237;
goto yy229;
}
}
yy227:
++YYCURSOR;
#line 470 "../src/parse/lex.re"
{
if (cur == eof)
{
if (depth)
{
fatal("missing '}'");
}
return 0;
}
goto code;
}
#line 1531 "src/parse/lex.cc"
yy229:
++YYCURSOR;
yy230:
#line 484 "../src/parse/lex.re"
{
goto code;
}
#line 1539 "src/parse/lex.cc"
yy231:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
YYCTXMARKER = YYCURSOR;
if (yych <= '\r') {
if (yych <= '\t') {
if (yych >= '\t') goto yy239;
} else {
if (yych <= '\n') goto yy241;
if (yych >= '\r') goto yy241;
}
} else {
if (yych <= ' ') {
if (yych >= ' ') goto yy239;
} else {
if (yych == '#') goto yy242;
}
}
yy232:
#line 451 "../src/parse/lex.re"
{
if (depth == 0)
{
tok += strspn(tok, " \t\r\n");
while (cur > tok && strchr(" \t\r\n", cur[-1]))
{
--cur;
}
yylval.code = new Code (tok, tok_len (), get_fname (), tline);
return TOKEN_CODE;
}
else if (cur == eof)
{
fatal("missing '}'");
}
pos = cur;
cline++;
goto code;
}
#line 1579 "src/parse/lex.cc"
yy233:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy230;
goto yy246;
yy234:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy230;
goto yy251;
yy235:
++YYCURSOR;
#line 423 "../src/parse/lex.re"
{
if (depth == 0)
{
fatal("Curly braces are not allowed after ':='");
}
else
{
++depth;
}
goto code;
}
#line 1604 "src/parse/lex.cc"
yy237:
++YYCURSOR;
#line 411 "../src/parse/lex.re"
{
if (depth == 0)
{
fatal("Curly braces are not allowed after ':='");
}
else if (--depth == 0)
{
yylval.code = new Code (tok, tok_len (), get_fname (), tline);
return TOKEN_CODE;
}
goto code;
}
#line 1620 "src/parse/lex.cc"
yy239:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= 0x1F) {
if (yych == '\t') goto yy253;
} else {
if (yych <= ' ') goto yy253;
if (yych == '#') goto yy242;
}
yy240:
YYCURSOR = YYCTXMARKER;
#line 438 "../src/parse/lex.re"
{
if (depth == 0)
{
goto code;
}
else if (cur == eof)
{
fatal("missing '}'");
}
pos = cur;
cline++;
goto code;
}
#line 1646 "src/parse/lex.cc"
yy241:
yych = (YYCTYPE)*++YYCURSOR;
goto yy240;
yy242:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 16) {
goto yy242;
}
if (yych == 'l') goto yy255;
yy244:
YYCURSOR = YYMARKER;
if (yyaccept <= 1) {
if (yyaccept == 0) {
goto yy232;
} else {
goto yy230;
}
} else {
goto yy240;
}
yy245:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
yy246:
if (yybm[0+yych] & 32) {
goto yy245;
}
if (yych <= '\n') goto yy244;
if (yych >= '#') goto yy249;
yy247:
++YYCURSOR;
#line 481 "../src/parse/lex.re"
{
goto code;
}
#line 1685 "src/parse/lex.cc"
yy249:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy244;
goto yy245;
yy250:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
yy251:
if (yybm[0+yych] & 64) {
goto yy250;
}
if (yych <= '\n') goto yy244;
if (yych <= '\'') goto yy247;
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy244;
goto yy250;
yy253:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy253;
goto yy244;
} else {
if (yych <= ' ') goto yy253;
if (yych == '#') goto yy242;
goto yy244;
}
yy255:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'i') goto yy244;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy244;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'e') goto yy244;
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy260;
if (yych <= '9') goto yy244;
goto yy260;
yy259:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy260:
if (yych <= 0x1F) {
if (yych == '\t') goto yy259;
goto yy244;
} else {
if (yych <= ' ') goto yy259;
if (yych <= '0') goto yy244;
if (yych >= ':') goto yy244;
}
yy261:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy261;
}
if (yych <= '\f') {
if (yych <= 0x08) goto yy244;
if (yych <= '\t') goto yy263;
if (yych <= '\n') goto yy265;
goto yy244;
} else {
if (yych <= '\r') goto yy267;
if (yych != ' ') goto yy244;
}
yy263:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy263;
goto yy244;
} else {
if (yych <= ' ') goto yy263;
if (yych == '"') goto yy268;
goto yy244;
}
yy265:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 434 "../src/parse/lex.re"
{
set_sourceline ();
goto code;
}
#line 1780 "src/parse/lex.cc"
yy267:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy265;
goto yy244;
yy268:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '!') {
if (yych == '\n') goto yy244;
goto yy268;
} else {
if (yych <= '"') goto yy270;
if (yych == '\\') goto yy271;
goto yy268;
}
yy270:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy265;
if (yych == '\r') goto yy267;
goto yy244;
yy271:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy244;
goto yy268;
}
#line 487 "../src/parse/lex.re"
comment:
#line 1814 "src/parse/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
128, 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 ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= ')') {
if (yych == '\n') goto yy276;
} else {
if (yych <= '*') goto yy278;
if (yych == '/') goto yy279;
}
++YYCURSOR;
yy275:
#line 519 "../src/parse/lex.re"
{
if (cur == eof)
{
return 0;
}
goto comment;
}
#line 1869 "src/parse/lex.cc"
yy276:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
goto yy280;
}
if (yych == '#') goto yy283;
yy277:
#line 510 "../src/parse/lex.re"
{
if (cur == eof)
{
return 0;
}
tok = pos = cur;
cline++;
goto comment;
}
#line 1887 "src/parse/lex.cc"
yy278:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy285;
goto yy275;
yy279:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy287;
goto yy275;
yy280:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 32) {
goto yy280;
}
if (yych == '#') goto yy283;
yy282:
YYCURSOR = YYMARKER;
goto yy277;
yy283:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy283;
goto yy282;
} else {
if (yych <= ' ') goto yy283;
if (yych == 'l') goto yy289;
goto yy282;
}
yy285:
++YYCURSOR;
#line 491 "../src/parse/lex.re"
{
if (--depth == 0)
{
goto scan;
}
else
{
goto comment;
}
}
#line 1932 "src/parse/lex.cc"
yy287:
++YYCURSOR;
#line 501 "../src/parse/lex.re"
{
++depth;
fatal("ambiguous /* found");
goto comment;
}
#line 1941 "src/parse/lex.cc"
yy289:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'i') goto yy282;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy282;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'e') goto yy282;
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy294;
if (yych <= '9') goto yy282;
goto yy294;
yy293:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy294:
if (yych <= 0x1F) {
if (yych == '\t') goto yy293;
goto yy282;
} else {
if (yych <= ' ') goto yy293;
if (yych <= '0') goto yy282;
if (yych >= ':') goto yy282;
}
yy295:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
goto yy295;
}
if (yych <= '\f') {
if (yych <= 0x08) goto yy282;
if (yych <= '\t') goto yy297;
if (yych <= '\n') goto yy299;
goto yy282;
} else {
if (yych <= '\r') goto yy301;
if (yych != ' ') goto yy282;
}
yy297:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
if (yych == '\t') goto yy297;
goto yy282;
} else {
if (yych <= ' ') goto yy297;
if (yych == '"') goto yy302;
goto yy282;
}
yy299:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 506 "../src/parse/lex.re"
{
set_sourceline ();
goto comment;
}
#line 2003 "src/parse/lex.cc"
yy301:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy299;
goto yy282;
yy302:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy302;
}
if (yych <= '\n') goto yy282;
if (yych >= '#') goto yy305;
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy299;
if (yych == '\r') goto yy301;
goto yy282;
yy305:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy282;
goto yy302;
}
#line 526 "../src/parse/lex.re"
nextLine:
#line 2033 "src/parse/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy310;
++YYCURSOR;
#line 537 "../src/parse/lex.re"
{ if(cur == eof) {
return 0;
}
goto nextLine;
}
#line 2046 "src/parse/lex.cc"
yy310:
++YYCURSOR;
#line 530 "../src/parse/lex.re"
{ if(cur == eof) {
return 0;
}
tok = pos = cur;
cline++;
goto scan;
}
#line 2057 "src/parse/lex.cc"
}
#line 542 "../src/parse/lex.re"
}
static void escape (std::string & dest, const std::string & src)
{
dest = src;
size_t l = dest.length();
for (size_t p = 0; p < l; ++p)
{
if (dest[p] == '\\')
{
dest.insert(++p, "\\");
++l;
}
}
}
RegExp *Scanner::lex_cls(bool neg)
{
Range *r = NULL, *s;
uint32_t u, l;
fst:
#line 2083 "src/parse/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == ']') goto yy315;
#line 566 "../src/parse/lex.re"
{ l = lex_cls_chr(); goto snd; }
#line 2091 "src/parse/lex.cc"
yy315:
++YYCURSOR;
#line 565 "../src/parse/lex.re"
{ goto end; }
#line 2096 "src/parse/lex.cc"
}
#line 567 "../src/parse/lex.re"
snd:
#line 2102 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*(YYMARKER = YYCURSOR);
if (yych == '-') goto yy320;
yy319:
#line 570 "../src/parse/lex.re"
{ u = l; goto add; }
#line 2111 "src/parse/lex.cc"
yy320:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
if (yych != ']') goto yy322;
YYCURSOR = YYMARKER;
goto yy319;
yy322:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
#line 571 "../src/parse/lex.re"
{
u = lex_cls_chr();
if (l > u) {
warn.swapped_range(get_line(), l, u);
std::swap(l, u);
}
goto add;
}
#line 2130 "src/parse/lex.cc"
}
#line 579 "../src/parse/lex.re"
add:
if (!(s = opts->encoding.encodeRange(l, u))) {
fatalf ("Bad code point range: '0x%X - 0x%X'", l, u);
}
r = Range::add(r, s);
goto fst;
end:
if (neg) {
r = Range::sub(opts->encoding.fullRange(), r);
}
return cls(r);
}
uint32_t Scanner::lex_cls_chr()
{
tok = cur;
#line 2151 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy328;
if (yych == '\\') goto yy330;
++YYCURSOR;
#line 602 "../src/parse/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
#line 2162 "src/parse/lex.cc"
yy328:
++YYCURSOR;
#line 597 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error"); }
#line 2167 "src/parse/lex.cc"
yy330:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= '`') {
if (yych <= '7') {
if (yych <= ',') {
if (yych != '\n') goto yy332;
} else {
if (yych <= '-') goto yy334;
if (yych <= '/') goto yy332;
if (yych <= '3') goto yy336;
goto yy338;
}
} else {
if (yych <= 'X') {
if (yych == 'U') goto yy339;
if (yych <= 'W') goto yy332;
goto yy341;
} else {
if (yych <= '[') goto yy332;
if (yych <= '\\') goto yy342;
if (yych <= ']') goto yy344;
goto yy332;
}
}
} else {
if (yych <= 'q') {
if (yych <= 'e') {
if (yych <= 'a') goto yy346;
if (yych <= 'b') goto yy348;
goto yy332;
} else {
if (yych <= 'f') goto yy350;
if (yych == 'n') goto yy352;
goto yy332;
}
} else {
if (yych <= 'u') {
if (yych <= 'r') goto yy354;
if (yych <= 's') goto yy332;
if (yych <= 't') goto yy356;
goto yy341;
} else {
if (yych <= 'v') goto yy358;
if (yych == 'x') goto yy360;
goto yy332;
}
}
}
#line 600 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in escape sequence"); }
#line 2218 "src/parse/lex.cc"
yy332:
++YYCURSOR;
#line 615 "../src/parse/lex.re"
{
warn.useless_escape(tline, tok - pos, tok[1]);
return static_cast<uint8_t>(tok[1]);
}
#line 2226 "src/parse/lex.cc"
yy334:
++YYCURSOR;
#line 613 "../src/parse/lex.re"
{ return static_cast<uint8_t>('-'); }
#line 2231 "src/parse/lex.cc"
yy336:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy337;
if (yych <= '7') goto yy361;
yy337:
#line 599 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); }
#line 2240 "src/parse/lex.cc"
yy338:
yych = (YYCTYPE)*++YYCURSOR;
goto yy337;
yy339:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') goto yy340;
if (yych <= '9') goto yy363;
} else {
if (yych <= 'F') goto yy363;
if (yych <= '`') goto yy340;
if (yych <= 'f') goto yy363;
}
yy340:
#line 598 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); }
#line 2258 "src/parse/lex.cc"
yy341:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') goto yy340;
if (yych <= '9') goto yy364;
goto yy340;
} else {
if (yych <= 'F') goto yy364;
if (yych <= '`') goto yy340;
if (yych <= 'f') goto yy364;
goto yy340;
}
yy342:
++YYCURSOR;
#line 612 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\\'); }
#line 2276 "src/parse/lex.cc"
yy344:
++YYCURSOR;
#line 614 "../src/parse/lex.re"
{ return static_cast<uint8_t>(']'); }
#line 2281 "src/parse/lex.cc"
yy346:
++YYCURSOR;
#line 605 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\a'); }
#line 2286 "src/parse/lex.cc"
yy348:
++YYCURSOR;
#line 606 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\b'); }
#line 2291 "src/parse/lex.cc"
yy350:
++YYCURSOR;
#line 607 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\f'); }
#line 2296 "src/parse/lex.cc"
yy352:
++YYCURSOR;
#line 608 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\n'); }
#line 2301 "src/parse/lex.cc"
yy354:
++YYCURSOR;
#line 609 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\r'); }
#line 2306 "src/parse/lex.cc"
yy356:
++YYCURSOR;
#line 610 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\t'); }
#line 2311 "src/parse/lex.cc"
yy358:
++YYCURSOR;
#line 611 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\v'); }
#line 2316 "src/parse/lex.cc"
yy360:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') goto yy340;
if (yych <= '9') goto yy365;
goto yy340;
} else {
if (yych <= 'F') goto yy365;
if (yych <= '`') goto yy340;
if (yych <= 'f') goto yy365;
goto yy340;
}
yy361:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '/') goto yy362;
if (yych <= '7') goto yy366;
yy362:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
goto yy337;
} else {
goto yy340;
}
yy363:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy362;
if (yych <= '9') goto yy368;
goto yy362;
} else {
if (yych <= 'F') goto yy368;
if (yych <= '`') goto yy362;
if (yych <= 'f') goto yy368;
goto yy362;
}
yy364:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy362;
if (yych <= '9') goto yy369;
goto yy362;
} else {
if (yych <= 'F') goto yy369;
if (yych <= '`') goto yy362;
if (yych <= 'f') goto yy369;
goto yy362;
}
yy365:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy362;
if (yych <= '9') goto yy370;
goto yy362;
} else {
if (yych <= 'F') goto yy370;
if (yych <= '`') goto yy362;
if (yych <= 'f') goto yy370;
goto yy362;
}
yy366:
++YYCURSOR;
#line 604 "../src/parse/lex.re"
{ return unesc_oct(tok, cur); }
#line 2381 "src/parse/lex.cc"
yy368:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy362;
if (yych <= '9') goto yy372;
goto yy362;
} else {
if (yych <= 'F') goto yy372;
if (yych <= '`') goto yy362;
if (yych <= 'f') goto yy372;
goto yy362;
}
yy369:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy362;
if (yych <= '9') goto yy365;
goto yy362;
} else {
if (yych <= 'F') goto yy365;
if (yych <= '`') goto yy362;
if (yych <= 'f') goto yy365;
goto yy362;
}
yy370:
++YYCURSOR;
#line 603 "../src/parse/lex.re"
{ return unesc_hex(tok, cur); }
#line 2410 "src/parse/lex.cc"
yy372:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy362;
if (yych >= ':') goto yy362;
} else {
if (yych <= 'F') goto yy373;
if (yych <= '`') goto yy362;
if (yych >= 'g') goto yy362;
}
yy373:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= '@') {
if (yych <= '/') goto yy362;
if (yych <= '9') goto yy364;
goto yy362;
} else {
if (yych <= 'F') goto yy364;
if (yych <= '`') goto yy362;
if (yych <= 'f') goto yy364;
goto yy362;
}
}
#line 619 "../src/parse/lex.re"
}
uint32_t Scanner::lex_str_chr(char quote, bool &end)
{
end = false;
tok = cur;
#line 2443 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy378;
if (yych == '\\') goto yy380;
++YYCURSOR;
#line 632 "../src/parse/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
#line 2457 "src/parse/lex.cc"
yy378:
++YYCURSOR;
#line 627 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error"); }
#line 2462 "src/parse/lex.cc"
yy380:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') {
if (yych <= 'T') {
if (yych <= '/') {
if (yych != '\n') goto yy382;
} else {
if (yych <= '3') goto yy384;
if (yych <= '7') goto yy386;
goto yy382;
}
} else {
if (yych <= 'X') {
if (yych <= 'U') goto yy387;
if (yych <= 'W') goto yy382;
goto yy389;
} else {
if (yych == '\\') goto yy390;
if (yych <= '`') goto yy382;
goto yy392;
}
}
} else {
if (yych <= 'r') {
if (yych <= 'f') {
if (yych <= 'b') goto yy394;
if (yych <= 'e') goto yy382;
goto yy396;
} else {
if (yych == 'n') goto yy398;
if (yych <= 'q') goto yy382;
goto yy400;
}
} else {
if (yych <= 'u') {
if (yych <= 's') goto yy382;
if (yych <= 't') goto yy402;
goto yy389;
} else {
if (yych <= 'v') goto yy404;
if (yych == 'x') goto yy406;
goto yy382;
}
}
}
#line 630 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in escape sequence"); }
#line 2510 "src/parse/lex.cc"
yy382:
++YYCURSOR;
#line 646 "../src/parse/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(tline, tok - pos, tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
#line 2520 "src/parse/lex.cc"
yy384:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy385;
if (yych <= '7') goto yy407;
yy385:
#line 629 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); }
#line 2529 "src/parse/lex.cc"
yy386:
yych = (YYCTYPE)*++YYCURSOR;
goto yy385;
yy387:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') goto yy388;
if (yych <= '9') goto yy409;
} else {
if (yych <= 'F') goto yy409;
if (yych <= '`') goto yy388;
if (yych <= 'f') goto yy409;
}
yy388:
#line 628 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); }
#line 2547 "src/parse/lex.cc"
yy389:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') goto yy388;
if (yych <= '9') goto yy410;
goto yy388;
} else {
if (yych <= 'F') goto yy410;
if (yych <= '`') goto yy388;
if (yych <= 'f') goto yy410;
goto yy388;
}
yy390:
++YYCURSOR;
#line 645 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\\'); }
#line 2565 "src/parse/lex.cc"
yy392:
++YYCURSOR;
#line 638 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\a'); }
#line 2570 "src/parse/lex.cc"
yy394:
++YYCURSOR;
#line 639 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\b'); }
#line 2575 "src/parse/lex.cc"
yy396:
++YYCURSOR;
#line 640 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\f'); }
#line 2580 "src/parse/lex.cc"
yy398:
++YYCURSOR;
#line 641 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\n'); }
#line 2585 "src/parse/lex.cc"
yy400:
++YYCURSOR;
#line 642 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\r'); }
#line 2590 "src/parse/lex.cc"
yy402:
++YYCURSOR;
#line 643 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\t'); }
#line 2595 "src/parse/lex.cc"
yy404:
++YYCURSOR;
#line 644 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\v'); }
#line 2600 "src/parse/lex.cc"
yy406:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') goto yy388;
if (yych <= '9') goto yy411;
goto yy388;
} else {
if (yych <= 'F') goto yy411;
if (yych <= '`') goto yy388;
if (yych <= 'f') goto yy411;
goto yy388;
}
yy407:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '/') goto yy408;
if (yych <= '7') goto yy412;
yy408:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
goto yy385;
} else {
goto yy388;
}
yy409:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy408;
if (yych <= '9') goto yy414;
goto yy408;
} else {
if (yych <= 'F') goto yy414;
if (yych <= '`') goto yy408;
if (yych <= 'f') goto yy414;
goto yy408;
}
yy410:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy408;
if (yych <= '9') goto yy415;
goto yy408;
} else {
if (yych <= 'F') goto yy415;
if (yych <= '`') goto yy408;
if (yych <= 'f') goto yy415;
goto yy408;
}
yy411:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy408;
if (yych <= '9') goto yy416;
goto yy408;
} else {
if (yych <= 'F') goto yy416;
if (yych <= '`') goto yy408;
if (yych <= 'f') goto yy416;
goto yy408;
}
yy412:
++YYCURSOR;
#line 637 "../src/parse/lex.re"
{ return unesc_oct(tok, cur); }
#line 2665 "src/parse/lex.cc"
yy414:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy408;
if (yych <= '9') goto yy418;
goto yy408;
} else {
if (yych <= 'F') goto yy418;
if (yych <= '`') goto yy408;
if (yych <= 'f') goto yy418;
goto yy408;
}
yy415:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy408;
if (yych <= '9') goto yy411;
goto yy408;
} else {
if (yych <= 'F') goto yy411;
if (yych <= '`') goto yy408;
if (yych <= 'f') goto yy411;
goto yy408;
}
yy416:
++YYCURSOR;
#line 636 "../src/parse/lex.re"
{ return unesc_hex(tok, cur); }
#line 2694 "src/parse/lex.cc"
yy418:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy408;
if (yych >= ':') goto yy408;
} else {
if (yych <= 'F') goto yy419;
if (yych <= '`') goto yy408;
if (yych >= 'g') goto yy408;
}
yy419:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= '@') {
if (yych <= '/') goto yy408;
if (yych <= '9') goto yy410;
goto yy408;
} else {
if (yych <= 'F') goto yy410;
if (yych <= '`') goto yy408;
if (yych <= 'f') goto yy410;
goto yy408;
}
}
#line 652 "../src/parse/lex.re"
}
RegExp *Scanner::lex_str(char quote, bool casing)
{
RegExp *r = NULL;
for (bool end;;) {
const uint32_t c = lex_str_chr(quote, end);
if (end) {
return r ? r : new NullOp;
}
r = doCat(r, casing ? ichr(c) : schr(c));
}
}
void Scanner::set_sourceline ()
{
sourceline:
tok = cur;
#line 2739 "src/parse/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
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, 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 ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '!') {
if (yych == '\n') goto yy424;
} else {
if (yych <= '"') goto yy426;
if (yych <= '0') goto yy422;
if (yych <= '9') goto yy427;
}
yy422:
++YYCURSOR;
yy423:
#line 695 "../src/parse/lex.re"
{
goto sourceline;
}
#line 2792 "src/parse/lex.cc"
yy424:
++YYCURSOR;
#line 683 "../src/parse/lex.re"
{
if (cur == eof)
{
--cur;
}
else
{
pos = cur;
}
tok = cur;
return;
}
#line 2808 "src/parse/lex.cc"
yy426:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy423;
goto yy431;
yy427:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
goto yy427;
}
#line 672 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline))
{
fatal ("line number overflow");
}
goto sourceline;
}
#line 2828 "src/parse/lex.cc"
yy430:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
yy431:
if (yybm[0+yych] & 128) {
goto yy430;
}
if (yych <= '\n') goto yy432;
if (yych <= '"') goto yy433;
goto yy435;
yy432:
YYCURSOR = YYMARKER;
goto yy423;
yy433:
++YYCURSOR;
#line 679 "../src/parse/lex.re"
{
escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes
goto sourceline;
}
#line 2850 "src/parse/lex.cc"
yy435:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy432;
goto yy430;
}
#line 698 "../src/parse/lex.re"
}
} // end namespace re2c