-/* Generated by re2c 0.10.0.dev on Sat Dec 31 00:11:13 2005 */
+/* Generated by re2c 0.10.0.dev on Sat Dec 31 00:57:11 2005 */
#line 1 "scanner.re"
/* $Id$ */
#include <stdlib.h>
goto yy3;
yy3:
#line 135 "scanner.re"
-{
+ {
goto echo;
}
#line 119 "scanner.cc"
goto yy6;
yy6:
#line 124 "scanner.re"
-{
+ {
out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok));
tok = pos = cursor; cline++; oline++;
goto echo;
goto yy8;
yy8:
#line 129 "scanner.re"
-{
+ {
out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok) - 1); // -1 so we don't write out the \0
if(cursor == eof) {
RETURN(0);
goto yy11;
yy11:
#line 115 "scanner.re"
-{
+ {
if (ignore_eoc) {
ignore_eoc = false;
} else {
goto yy20;
yy20:
#line 104 "scanner.re"
-{
+ {
out.write((const char*)(tok), (const char*)(&cursor[-7]) - (const char*)(tok));
tok = cursor;
RETURN(1);
goto yy28;
yy28:
#line 109 "scanner.re"
-{
+ {
out << "#define YYMAXFILL " << maxFill << std::endl;
tok = pos = cursor;
ignore_eoc = true;
}
yy32:
#line 160 "scanner.re"
-{ depth = 1;
+ { depth = 1;
goto code;
}
#line 349 "scanner.cc"
goto yy34;
yy34:
#line 190 "scanner.re"
-{ RETURN(*tok); }
+ { RETURN(*tok); }
#line 357 "scanner.cc"
yy35:
++YYCURSOR;
goto yy36;
yy36:
#line 192 "scanner.re"
-{ yylval.op = *tok;
+ { yylval.op = *tok;
RETURN(CLOSE); }
#line 366 "scanner.cc"
yy37:
goto yy38;
yy38:
#line 177 "scanner.re"
-{ fatal("unterminated string constant (missing \")"); }
+ { fatal("unterminated string constant (missing \")"); }
#line 375 "scanner.cc"
yy39:
yyaccept = 2;
goto yy40;
yy40:
#line 178 "scanner.re"
-{ fatal("unterminated string constant (missing ')"); }
+ { fatal("unterminated string constant (missing ')"); }
#line 384 "scanner.cc"
yy41:
yyaccept = 3;
goto yy71;
yy42:
#line 188 "scanner.re"
-{ fatal("unterminated range (missing ])"); }
+ { fatal("unterminated range (missing ])"); }
#line 394 "scanner.cc"
yy43:
yych = *++YYCURSOR;
goto yy62;
yy46:
#line 212 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.symbol = Symbol::find(token());
return ID; }
#line 410 "scanner.cc"
goto yy49;
yy49:
#line 223 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.regexp = mkDot();
return RANGE;
}
goto yy59;
yy51:
#line 228 "scanner.re"
-{ goto scan; }
+ { goto scan; }
#line 432 "scanner.cc"
yy52:
++YYCURSOR;
goto yy53;
yy53:
#line 230 "scanner.re"
-{ if(cursor == eof) RETURN(0);
+ { if(cursor == eof) RETURN(0);
pos = cursor; cline++;
goto scan;
}
goto yy55;
yy55:
#line 235 "scanner.re"
-{ std::cerr << "line " << tline << ", column " << (tchar + 1)
+ { std::cerr << "line " << tline << ", column " << (tchar + 1)
<< ": unexpected character: ";
if (isprint(*tok))
{
}
yy69:
#line 216 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
tok+= 5; /* skip "re2c:" */
iscfg = 1;
yylval.str = new Str(token());
goto yy76;
yy76:
#line 184 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.regexp = ranToRE(token());
return RANGE; }
#line 590 "scanner.cc"
goto yy79;
yy79:
#line 180 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.regexp = invToRE(token());
return RANGE; }
#line 605 "scanner.cc"
goto yy84;
yy84:
#line 173 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.regexp = strToCaseInsensitiveRE(token());
return STRING; }
#line 634 "scanner.cc"
goto yy89;
yy89:
#line 169 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.regexp = strToRE(token());
return STRING; }
#line 663 "scanner.cc"
goto yy91;
yy91:
#line 166 "scanner.re"
-{ tok = cursor;
+ { tok = cursor;
RETURN(0); }
#line 671 "scanner.cc"
yy92:
goto yy93;
yy93:
#line 163 "scanner.re"
-{ depth = 1;
+ { depth = 1;
goto comment; }
#line 679 "scanner.cc"
yy94:
goto yy98;
yy98:
#line 210 "scanner.re"
-{ fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); }
+ { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); }
#line 704 "scanner.cc"
yy99:
++YYCURSOR;
goto yy100;
yy100:
#line 198 "scanner.re"
-{ yylval.extop.minsize = atoi((char *)tok+1);
+ { yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = atoi((char *)tok+1);
RETURN(CLOSESIZE); }
#line 713 "scanner.cc"
goto yy103;
yy103:
#line 206 "scanner.re"
-{ yylval.extop.minsize = atoi((char *)tok+1);
+ { yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = -1;
RETURN(CLOSESIZE); }
#line 729 "scanner.cc"
goto yy107;
yy107:
#line 202 "scanner.re"
-{ yylval.extop.minsize = atoi((char *)tok+1);
+ { yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = MAX(yylval.extop.minsize,atoi(strchr((char *)tok, ',')+1));
RETURN(CLOSESIZE); }
#line 748 "scanner.cc"
goto yy110;
yy110:
#line 195 "scanner.re"
-{ yylval.op = '*';
+ { yylval.op = '*';
RETURN(CLOSE); }
#line 763 "scanner.cc"
}
goto yy114;
yy114:
#line 251 "scanner.re"
-{ if(--depth == 0){
+ { if(--depth == 0){
cur = cursor;
yylval.token = new Token(token(), tline);
return CODE;
goto yy116;
yy116:
#line 257 "scanner.re"
-{ ++depth;
+ { ++depth;
goto code; }
#line 816 "scanner.cc"
yy117:
goto yy118;
yy118:
#line 259 "scanner.re"
-{ if(cursor == eof) fatal("missing '}'");
+ { if(cursor == eof) fatal("missing '}'");
pos = cursor; cline++;
goto code;
}
goto yy120;
yy120:
#line 263 "scanner.re"
-{ goto code; }
+ { goto code; }
#line 833 "scanner.cc"
yy121:
yyaccept = 0;
goto yy133;
yy133:
#line 279 "scanner.re"
-{ goto comment; }
+ { goto comment; }
#line 918 "scanner.cc"
yy134:
yych = *++YYCURSOR;
goto yy136;
yy136:
#line 275 "scanner.re"
-{ if(cursor == eof) RETURN(0);
+ { if(cursor == eof) RETURN(0);
tok = pos = cursor; cline++;
goto comment;
}
goto yy139;
yy139:
#line 272 "scanner.re"
-{ ++depth;
+ { ++depth;
fatal("ambiguous /* found");
goto comment; }
#line 944 "scanner.cc"
goto yy141;
yy141:
#line 268 "scanner.re"
-{ if(--depth == 0)
+ { if(--depth == 0)
goto scan;
else
goto comment; }
goto yy153;
yy145:
#line 284 "scanner.re"
-{ goto config; }
+ { goto config; }
#line 984 "scanner.cc"
yy146:
++YYCURSOR;
goto yy151;
yy147:
#line 285 "scanner.re"
-{ iscfg = 2;
+ { iscfg = 2;
cur = cursor;
RETURN('=');
}
goto yy149;
yy149:
#line 289 "scanner.re"
-{ fatal("missing '='"); }
+ { fatal("missing '='"); }
#line 1002 "scanner.cc"
yy150:
++YYCURSOR;
}
yy156:
#line 299 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.str = new Str(token());
iscfg = 0;
return VALUE;
}
yy158:
#line 294 "scanner.re"
-{ cur = cursor;
+ { cur = cursor;
yylval.number = atoi(token().to_string().c_str());
iscfg = 0;
return NUMBER;