Version 0.10.2 (????-??-??)
---------------------------
-- Change to not generate yyaccept code unless needed.
-- Change to use if- instead of switch-expression when yyaccpt has only one case.
+- Added configuration 'state:abort'.
+- Changed to not generate yyNext unless configuration 'state:nextlabel' is used.
+- Changed to not generate yyaccept code unless needed.
+- Changed to use if- instead of switch-expression when yyaccpt has only one case.
- Added docu, examples and tests to .src.zip package (0.10.1 zip was repackaged).
- Fixed #1463639 Missing forward declaration.
- Implemented #1187127 savable state support for multiple re2c blocks.
o << "\n";
}
- if (fFlag && start_label == 0)
- {
- vUsedLabels.insert(start_label);
- o << indent(ind) << "switch(YYGETSTATE())\n";
- o << indent(ind) << "{\n";
- o << indent(ind) << "case -1: goto yy" << start_label << ";\n";
-
- for (size_t i=0; i<last_fill_index; ++i)
- {
- o << indent(ind) << "case " << i << ": goto yyFillLabel" << i << ";\n";
- }
-
- o << indent(ind) << "default: /* abort() */;\n";
- o << indent(ind) << "}\n";
- o << "yyNext:\n";
- }
+ genGetState(o, ind, start_label);
// Generate code
for (s = head; s; s = s->next)
bUseStartLabel = false;
}
+void genGetState(std::ostream &o, uint& ind, uint start_label)
+{
+ if (fFlag && !bWroteGetState)
+ {
+ vUsedLabels.insert(start_label);
+ o << indent(ind) << "switch(YYGETSTATE())\n";
+ o << indent(ind) << "{\n";
+ if (bUseStateAbort)
+ {
+ o << indent(ind) << "default: abort();\n";
+ o << indent(ind) << "case -1: goto yy" << start_label << ";\n";
+ }
+ else
+ {
+ o << indent(ind) << "default: goto yy" << start_label << ";\n";
+ }
+
+ for (size_t i=0; i<last_fill_index; ++i)
+ {
+ o << indent(ind) << "case " << i << ": goto yyFillLabel" << i << ";\n";
+ }
+
+ o << indent(ind) << "}\n";
+ if (bUseStateNext)
+ {
+ o << "yyNext:\n";
+ }
+ bWroteGetState = true;
+ }
+}
+
std::ostream& operator << (std::ostream& o, const file_info& li)
{
if (li.ln)
}
else if (cfg.to_string() == "startlabel")
{
- bUseStartLabel = num ? 1 : 0;
+ bUseStartLabel = num != 0;
startLabelName = "";
}
+ else if (cfg.to_string() == "state:abort")
+ {
+ bUseStateAbort = num != 0;
+ }
+ else if (cfg.to_string() == "state:nextlabel")
+ {
+ bUseStateNext = num != 0;
+ }
else
{
fatal("unrecognized configuration name or illegal integer value");
extern uint topIndent;
extern std::string indString;
extern bool yybmHexTable;
+extern bool bUseStateAbort;
+extern bool bUseStateNext;
+extern bool bWroteGetState;
extern uint asc2ebc[256];
extern uint ebc2asc[256];
a text value then a label with that text will be generated regardless of
whether the normal start label is being used or not. This setting is being
reset to <b>0</b> after a start label has been generated.</dd>
+<dt><i>re2c:state:abort</i> <b>=</b> 0 <b>;</b></dt>
+<dd>When not zero and switch -f is active then the YYGETSTATE block will
+contain a default case that aborts and a -1 case used for initialization.</dd>
+<dt><i>re2c:state:nextlabel</i> <b>=</b> 0 <b>;</b></dt>
+<dd>Used when -f is active to control whether the YYGETSTATE block is
+followed by a yyNext: label line.</dd>
</dl>
<a name="lbAK" id="lbAK"> </a>
<h2>A LARGER EXAMPLE</h2>
bool bUsedYYAccept = false;
bool bUseStartLabel= false;
+bool bUseStateNext = false;
std::string startLabelName;
uint maxFill = 1;
uint next_label = 0;
uint topIndent = 0;
std::string indString("\t");
bool yybmHexTable = false;
+bool bUseStateAbort = false;
+bool bWroteGetState = false;
uint nRealChars = 256;
next_label = 0;
next_fill_index = 0;
Symbol::ClearTable();
+ bWroteGetState = false;
}
parse(scanner, output);
};
extern void genCode(std::ostream&, RegExp*);
-extern void genCode(std::ostream&, uint ind, RegExp*);
+extern void genCode(std::ostream&, uint, RegExp*);
+extern void genGetState(std::ostream&, uint&, uint);
extern RegExp *mkDiff(RegExp*, RegExp*);
-extern RegExp *mkAlt(RegExp *e1, RegExp *e2);
+extern RegExp *mkAlt(RegExp*, RegExp*);
} // end namespace re2c
.ds rx regular expression
.ds lx \fIl\fP-expression
\"$Log$
+\"Revision 1.43 2006/04/09 00:06:33 helly
+\"- Added configuration 'state:abort'.
+\"- Changed to not generate yyNext unless configuration 'state:nextlabel' is
+\" used.
+\"- Add tests for the new configurations and adapt old tests.
+\"
\"Revision 1.42 2006/04/08 21:33:02 helly
\"- Update docu
\"
value then a label with that text will be generated regardless of whether the
normal start label is being used or not. This setting is being reset to \fB0\fP
after a start label has been generated.
+.TP
+\fIre2c:state:abort\fP \fB=\fP 0 \fB;\fP
+When not zero and switch -f is active then the \fCYYGETSTATE\fP block will
+contain a default case that aborts and a -1 case used for initialization.
+.TP
+\fIre2c:state:nextlabel\fP \fB=\fP 0 \fB;\fP
+Used when -f is active to control whether the \fCYYGETSTATE\fP block is
+followed by a \fCyyNext:\fP label line.
.SH "A LARGER EXAMPLE"
.LP
--- /dev/null
+/* Generated by re2c */
+#line 1 "config4a.f.re"
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+
+#line 15 "<stdout>"
+{
+
+ switch(YYGETSTATE())
+ {
+ default: goto yy0;
+ case 0: goto yyFillLabel0;
+ case 1: goto yyFillLabel1;
+ }
+yy0:
+ YYSETSTATE(0);
+ if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yyFillLabel0:
+ yych = *YYCURSOR;
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2;
+ default: goto yy4;
+ }
+yy2:
+ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy7;
+yy3:
+#line 13 "config4a.f.re"
+ { return YYCURSOR; }
+#line 49 "<stdout>"
+yy4:
+ ++YYCURSOR;
+#line 14 "config4a.f.re"
+ { return NULL; }
+#line 54 "<stdout>"
+yy6:
+ ++YYCURSOR;
+ YYSETSTATE(1);
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+yyFillLabel1:
+ yych = *YYCURSOR;
+yy7:
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy6;
+ default: goto yy3;
+ }
+}
+#line 15 "config4a.f.re"
+
+}
--- /dev/null
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+/*!re2c
+ re2c:state:abort = 0;
+ [0-9]+ { return YYCURSOR; }
+ [\000-\377] { return NULL; }
+*/
+}
--- /dev/null
+/* Generated by re2c */
+#line 1 "config4b.f.re"
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+
+#line 15 "<stdout>"
+{
+
+ switch(YYGETSTATE())
+ {
+ default: abort();
+ case -1: goto yy0;
+ case 0: goto yyFillLabel0;
+ case 1: goto yyFillLabel1;
+ }
+yy0:
+ YYSETSTATE(0);
+ if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yyFillLabel0:
+ yych = *YYCURSOR;
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2;
+ default: goto yy4;
+ }
+yy2:
+ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy7;
+yy3:
+#line 13 "config4b.f.re"
+ { return YYCURSOR; }
+#line 50 "<stdout>"
+yy4:
+ ++YYCURSOR;
+#line 14 "config4b.f.re"
+ { return NULL; }
+#line 55 "<stdout>"
+yy6:
+ ++YYCURSOR;
+ YYSETSTATE(1);
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+yyFillLabel1:
+ yych = *YYCURSOR;
+yy7:
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy6;
+ default: goto yy3;
+ }
+}
+#line 15 "config4b.f.re"
+
+}
--- /dev/null
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+/*!re2c
+ re2c:state:abort = 1;
+ [0-9]+ { return YYCURSOR; }
+ [\000-\377] { return NULL; }
+*/
+}
--- /dev/null
+/* Generated by re2c */
+#line 1 "config4c.f.re"
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+
+#line 15 "<stdout>"
+{
+
+ switch(YYGETSTATE())
+ {
+ default: goto yy0;
+ case 0: goto yyFillLabel0;
+ case 1: goto yyFillLabel1;
+ }
+start:
+yy0:
+ YYSETSTATE(0);
+ if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yyFillLabel0:
+ yych = *YYCURSOR;
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2;
+ default: goto yy4;
+ }
+yy2:
+ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy7;
+yy3:
+#line 14 "config4c.f.re"
+ { return YYCURSOR; }
+#line 50 "<stdout>"
+yy4:
+ ++YYCURSOR;
+#line 15 "config4c.f.re"
+ { return NULL; }
+#line 55 "<stdout>"
+yy6:
+ ++YYCURSOR;
+ YYSETSTATE(1);
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+yyFillLabel1:
+ yych = *YYCURSOR;
+yy7:
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy6;
+ default: goto yy3;
+ }
+}
+#line 16 "config4c.f.re"
+
+}
--- /dev/null
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+/*!re2c
+ re2c:startlabel = "start";
+ re2c:state:abort = 0;
+ [0-9]+ { return YYCURSOR; }
+ [\000-\377] { return NULL; }
+*/
+}
--- /dev/null
+/* Generated by re2c */
+#line 1 "config4d.f.re"
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+
+#line 15 "<stdout>"
+{
+
+ switch(YYGETSTATE())
+ {
+ default: goto yy0;
+ case 0: goto yyFillLabel0;
+ case 1: goto yyFillLabel1;
+ }
+yyNext:
+start:
+yy0:
+ YYSETSTATE(0);
+ if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yyFillLabel0:
+ yych = *YYCURSOR;
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2;
+ default: goto yy4;
+ }
+yy2:
+ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy7;
+yy3:
+#line 15 "config4d.f.re"
+ { return YYCURSOR; }
+#line 51 "<stdout>"
+yy4:
+ ++YYCURSOR;
+#line 16 "config4d.f.re"
+ { return NULL; }
+#line 56 "<stdout>"
+yy6:
+ ++YYCURSOR;
+ YYSETSTATE(1);
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+yyFillLabel1:
+ yych = *YYCURSOR;
+yy7:
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy6;
+ default: goto yy3;
+ }
+}
+#line 17 "config4d.f.re"
+
+}
--- /dev/null
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+/*!re2c
+ re2c:startlabel = "start";
+ re2c:state:abort = 0;
+ re2c:state:nextlabel = 1;
+ [0-9]+ { return YYCURSOR; }
+ [\000-\377] { return NULL; }
+*/
+}
--- /dev/null
+/* Generated by re2c */
+#line 1 "config4e.f.re"
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+
+#line 15 "<stdout>"
+{
+
+ switch(YYGETSTATE())
+ {
+ default: goto yy0;
+ case 0: goto yyFillLabel0;
+ case 1: goto yyFillLabel1;
+ }
+yyNext:
+yy0:
+ YYSETSTATE(0);
+ if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yyFillLabel0:
+ yych = *YYCURSOR;
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2;
+ default: goto yy4;
+ }
+yy2:
+ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy7;
+yy3:
+#line 15 "config4e.f.re"
+ { return YYCURSOR; }
+#line 50 "<stdout>"
+yy4:
+ ++YYCURSOR;
+#line 16 "config4e.f.re"
+ { return NULL; }
+#line 55 "<stdout>"
+yy6:
+ ++YYCURSOR;
+ YYSETSTATE(1);
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+yyFillLabel1:
+ yych = *YYCURSOR;
+yy7:
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy6;
+ default: goto yy3;
+ }
+}
+#line 17 "config4e.f.re"
+
+}
--- /dev/null
+#define NULL ((char*) 0)
+#define YYCTYPE char
+#define YYCURSOR p
+#define YYLIMIT p
+#define YYMARKER q
+#define YYFILL(n)
+
+char *scan(char *p)
+{
+ char *q;
+/*!re2c
+ re2c:startlabel = "yyNext";
+ re2c:state:abort = 0;
+ re2c:state:nextlabel = 0;
+ [0-9]+ { return YYCURSOR; }
+ [\000-\377] { return NULL; }
+*/
+}
switch(YYGETSTATE())
{
- case -1: goto yy0;
+ default: goto yy0;
case 0: goto yyFillLabel0;
case 1: goto yyFillLabel1;
case 2: goto yyFillLabel2;
- default: /* abort() */;
}
-yyNext:
yy0:
YYSETSTATE(0);
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yy3:
#line 246 "push.f.re"
{ SEND(kIdentifier); }
-#line 339 "<stdout>"
+#line 337 "<stdout>"
yy4:
yych = *++YYCURSOR;
switch(yych){
yy13:
#line 247 "push.f.re"
{ SEND(kDecimalConstant);}
-#line 389 "<stdout>"
+#line 387 "<stdout>"
yy14:
++YYCURSOR;
#line 249 "push.f.re"
{ SEND(kEqual); }
-#line 394 "<stdout>"
+#line 392 "<stdout>"
yy16:
++YYCURSOR;
#line 250 "push.f.re"
{ SEND(kLeftParen); }
-#line 399 "<stdout>"
+#line 397 "<stdout>"
yy18:
++YYCURSOR;
#line 251 "push.f.re"
{ SEND(kRightParen); }
-#line 404 "<stdout>"
+#line 402 "<stdout>"
yy20:
++YYCURSOR;
#line 252 "push.f.re"
{ SEND(kMinus); }
-#line 409 "<stdout>"
+#line 407 "<stdout>"
yy22:
++YYCURSOR;
#line 253 "push.f.re"
{ SEND(kPlus); }
-#line 414 "<stdout>"
+#line 412 "<stdout>"
yy24:
++YYCURSOR;
#line 254 "push.f.re"
{ SEND(kStar); }
-#line 419 "<stdout>"
+#line 417 "<stdout>"
yy26:
++YYCURSOR;
#line 255 "push.f.re"
{ SEND(kSlash); }
-#line 424 "<stdout>"
+#line 422 "<stdout>"
yy28:
++YYCURSOR;
#line 257 "push.f.re"
{ SKIP(); }
-#line 429 "<stdout>"
+#line 427 "<stdout>"
yy30:
++YYCURSOR;
#line 258 "push.f.re"
{ SKIP(); }
-#line 434 "<stdout>"
+#line 432 "<stdout>"
yy32:
++YYCURSOR;
#line 259 "push.f.re"
{ send(kEOF); return 1; }
-#line 439 "<stdout>"
+#line 437 "<stdout>"
yy34:
++YYCURSOR;
#line 260 "push.f.re"
{ SEND(kUnknown); }
-#line 444 "<stdout>"
+#line 442 "<stdout>"
yy36:
++YYCURSOR;
YYSETSTATE(1);
yy45:
#line 245 "push.f.re"
{ SEND(kReturn); }
-#line 633 "<stdout>"
+#line 631 "<stdout>"
yy46:
yych = *++YYCURSOR;
switch(yych){
yy50:
#line 244 "push.f.re"
{ SEND(kWhile); }
-#line 723 "<stdout>"
+#line 721 "<stdout>"
yy51:
yych = *++YYCURSOR;
switch(yych){
yy55:
#line 243 "push.f.re"
{ SEND(kBreak); }
-#line 813 "<stdout>"
+#line 811 "<stdout>"
yy56:
yych = *++YYCURSOR;
switch(yych){
yy59:
#line 242 "push.f.re"
{ SEND(kGoto); }
-#line 897 "<stdout>"
+#line 895 "<stdout>"
yy60:
yych = *++YYCURSOR;
switch(yych){
yy63:
#line 241 "push.f.re"
{ SEND(kElse); }
-#line 981 "<stdout>"
+#line 979 "<stdout>"
yy64:
yych = *++YYCURSOR;
switch(yych){
yy66:
#line 240 "push.f.re"
{ SEND(kFor); }
-#line 1059 "<stdout>"
+#line 1057 "<stdout>"
yy67:
++YYCURSOR;
switch((yych = *YYCURSOR)) {
yy68:
#line 239 "push.f.re"
{ SEND(kIf); }
-#line 1131 "<stdout>"
+#line 1129 "<stdout>"
}
#line 261 "push.f.re"
switch(YYGETSTATE())
{
- case -1: goto yy0;
+ default: goto yy0;
case 0: goto yyFillLabel0;
case 1: goto yyFillLabel1;
case 2: goto yyFillLabel2;
- default: /* abort() */;
}
-yyNext:
yy0:
YYSETSTATE(0);
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yy3:
#line 246 "push.fb.re"
{ SEND(kIdentifier); }
-#line 367 "<stdout>"
+#line 365 "<stdout>"
yy4:
yych = *++YYCURSOR;
if(yych == 'o') goto yy64;
yy13:
#line 247 "push.fb.re"
{ SEND(kDecimalConstant);}
-#line 405 "<stdout>"
+#line 403 "<stdout>"
yy14:
++YYCURSOR;
#line 249 "push.fb.re"
{ SEND(kEqual); }
-#line 410 "<stdout>"
+#line 408 "<stdout>"
yy16:
++YYCURSOR;
#line 250 "push.fb.re"
{ SEND(kLeftParen); }
-#line 415 "<stdout>"
+#line 413 "<stdout>"
yy18:
++YYCURSOR;
#line 251 "push.fb.re"
{ SEND(kRightParen); }
-#line 420 "<stdout>"
+#line 418 "<stdout>"
yy20:
++YYCURSOR;
#line 252 "push.fb.re"
{ SEND(kMinus); }
-#line 425 "<stdout>"
+#line 423 "<stdout>"
yy22:
++YYCURSOR;
#line 253 "push.fb.re"
{ SEND(kPlus); }
-#line 430 "<stdout>"
+#line 428 "<stdout>"
yy24:
++YYCURSOR;
#line 254 "push.fb.re"
{ SEND(kStar); }
-#line 435 "<stdout>"
+#line 433 "<stdout>"
yy26:
++YYCURSOR;
#line 255 "push.fb.re"
{ SEND(kSlash); }
-#line 440 "<stdout>"
+#line 438 "<stdout>"
yy28:
++YYCURSOR;
#line 257 "push.fb.re"
{ SKIP(); }
-#line 445 "<stdout>"
+#line 443 "<stdout>"
yy30:
++YYCURSOR;
#line 258 "push.fb.re"
{ SKIP(); }
-#line 450 "<stdout>"
+#line 448 "<stdout>"
yy32:
++YYCURSOR;
#line 259 "push.fb.re"
{ send(kEOF); return 1; }
-#line 455 "<stdout>"
+#line 453 "<stdout>"
yy34:
++YYCURSOR;
#line 260 "push.fb.re"
{ SEND(kUnknown); }
-#line 460 "<stdout>"
+#line 458 "<stdout>"
yy36:
++YYCURSOR;
YYSETSTATE(1);
}
#line 245 "push.fb.re"
{ SEND(kReturn); }
-#line 498 "<stdout>"
+#line 496 "<stdout>"
yy46:
yych = *++YYCURSOR;
if(yych != 'i') goto yy39;
}
#line 244 "push.fb.re"
{ SEND(kWhile); }
-#line 512 "<stdout>"
+#line 510 "<stdout>"
yy51:
yych = *++YYCURSOR;
if(yych != 'e') goto yy39;
}
#line 243 "push.fb.re"
{ SEND(kBreak); }
-#line 526 "<stdout>"
+#line 524 "<stdout>"
yy56:
yych = *++YYCURSOR;
if(yych != 't') goto yy39;
}
#line 242 "push.fb.re"
{ SEND(kGoto); }
-#line 538 "<stdout>"
+#line 536 "<stdout>"
yy60:
yych = *++YYCURSOR;
if(yych != 's') goto yy39;
}
#line 241 "push.fb.re"
{ SEND(kElse); }
-#line 550 "<stdout>"
+#line 548 "<stdout>"
yy64:
yych = *++YYCURSOR;
if(yych != 'r') goto yy39;
}
#line 240 "push.fb.re"
{ SEND(kFor); }
-#line 560 "<stdout>"
+#line 558 "<stdout>"
yy67:
++YYCURSOR;
if(yybm[0+(yych = *YYCURSOR)] & 128) {
}
#line 239 "push.fb.re"
{ SEND(kIf); }
-#line 568 "<stdout>"
+#line 566 "<stdout>"
}
}
#line 261 "push.fb.re"
switch(YYGETSTATE())
{
- case -1: goto yy0;
+ default: goto yy0;
case 0: goto yyFillLabel0;
case 1: goto yyFillLabel1;
case 2: goto yyFillLabel2;
- default: /* abort() */;
}
-yyNext:
yy0:
YYSETSTATE(0);
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yy3:
#line 35 "push.fs.re"
{ SEND(kIdentifier); }
-#line 121 "<stdout>"
+#line 119 "<stdout>"
yy4:
yych = *++YYCURSOR;
if(yych == 'o') goto yy64;
yy13:
#line 36 "push.fs.re"
{ SEND(kDecimalConstant);}
-#line 159 "<stdout>"
+#line 157 "<stdout>"
yy14:
++YYCURSOR;
#line 38 "push.fs.re"
{ SEND(kEqual); }
-#line 164 "<stdout>"
+#line 162 "<stdout>"
yy16:
++YYCURSOR;
#line 39 "push.fs.re"
{ SEND(kLeftParen); }
-#line 169 "<stdout>"
+#line 167 "<stdout>"
yy18:
++YYCURSOR;
#line 40 "push.fs.re"
{ SEND(kRightParen); }
-#line 174 "<stdout>"
+#line 172 "<stdout>"
yy20:
++YYCURSOR;
#line 41 "push.fs.re"
{ SEND(kMinus); }
-#line 179 "<stdout>"
+#line 177 "<stdout>"
yy22:
++YYCURSOR;
#line 42 "push.fs.re"
{ SEND(kPlus); }
-#line 184 "<stdout>"
+#line 182 "<stdout>"
yy24:
++YYCURSOR;
#line 43 "push.fs.re"
{ SEND(kStar); }
-#line 189 "<stdout>"
+#line 187 "<stdout>"
yy26:
++YYCURSOR;
#line 44 "push.fs.re"
{ SEND(kSlash); }
-#line 194 "<stdout>"
+#line 192 "<stdout>"
yy28:
++YYCURSOR;
#line 46 "push.fs.re"
{ SKIP(); }
-#line 199 "<stdout>"
+#line 197 "<stdout>"
yy30:
++YYCURSOR;
#line 47 "push.fs.re"
{ SKIP(); }
-#line 204 "<stdout>"
+#line 202 "<stdout>"
yy32:
++YYCURSOR;
#line 48 "push.fs.re"
{ send(kEOF); return 1; }
-#line 209 "<stdout>"
+#line 207 "<stdout>"
yy34:
++YYCURSOR;
#line 49 "push.fs.re"
{ SEND(kUnknown); }
-#line 214 "<stdout>"
+#line 212 "<stdout>"
yy36:
++YYCURSOR;
YYSETSTATE(1);
yy45:
#line 34 "push.fs.re"
{ SEND(kReturn); }
-#line 272 "<stdout>"
+#line 270 "<stdout>"
yy46:
yych = *++YYCURSOR;
if(yych != 'i') goto yy39;
yy50:
#line 33 "push.fs.re"
{ SEND(kWhile); }
-#line 296 "<stdout>"
+#line 294 "<stdout>"
yy51:
yych = *++YYCURSOR;
if(yych != 'e') goto yy39;
yy55:
#line 32 "push.fs.re"
{ SEND(kBreak); }
-#line 320 "<stdout>"
+#line 318 "<stdout>"
yy56:
yych = *++YYCURSOR;
if(yych != 't') goto yy39;
yy59:
#line 31 "push.fs.re"
{ SEND(kGoto); }
-#line 342 "<stdout>"
+#line 340 "<stdout>"
yy60:
yych = *++YYCURSOR;
if(yych != 's') goto yy39;
yy63:
#line 30 "push.fs.re"
{ SEND(kElse); }
-#line 364 "<stdout>"
+#line 362 "<stdout>"
yy64:
yych = *++YYCURSOR;
if(yych != 'r') goto yy39;
yy66:
#line 29 "push.fs.re"
{ SEND(kFor); }
-#line 384 "<stdout>"
+#line 382 "<stdout>"
yy67:
++YYCURSOR;
if((yych = *YYCURSOR) <= 'Z') {
yy68:
#line 28 "push.fs.re"
{ SEND(kIf); }
-#line 402 "<stdout>"
+#line 400 "<stdout>"
}
#line 50 "push.fs.re"
switch(YYGETSTATE())
{
- case -1: goto yy0;
+ default: goto yy0;
case 0: goto yyFillLabel0;
case 1: goto yyFillLabel1;
case 2: goto yyFillLabel2;
case 33: goto yyFillLabel33;
case 34: goto yyFillLabel34;
case 35: goto yyFillLabel35;
- default: /* abort() */;
}
-yyNext:
yy0:
YYSETSTATE(0);
if((YYLIMIT - YYCURSOR) < 11) YYFILL(11);
{
goto echo;
}
-#line 161 "<stdout>"
+#line 159 "<stdout>"
yy4:
yych = *++YYCURSOR;
if(yych == '/') goto yy10;
tok = pos = cursor; cline++;
goto echo;
}
-#line 174 "<stdout>"
+#line 172 "<stdout>"
yy7:
++YYCURSOR;
#line 135 "scanner.fs.re"
RETURN(0);
}
}
-#line 184 "<stdout>"
+#line 182 "<stdout>"
yy9:
yych = *++YYCURSOR;
goto yy3;
tok = pos = cursor;
goto echo;
}
-#line 200 "<stdout>"
+#line 198 "<stdout>"
yy12:
yych = *++YYCURSOR;
if(yych == '!') goto yy14;
tok = cursor;
RETURN(1);
}
-#line 230 "<stdout>"
+#line 228 "<stdout>"
yy21:
yych = *++YYCURSOR;
if(yych != 'x') goto yy13;
ignore_eoc = true;
goto echo;
}
-#line 252 "<stdout>"
+#line 250 "<stdout>"
}
#line 144 "scanner.fs.re"
goto value;
}
-#line 277 "<stdout>"
+#line 275 "<stdout>"
{
YYSETSTATE(1);
{ depth = 1;
goto code;
}
-#line 356 "<stdout>"
+#line 354 "<stdout>"
yy33:
++YYCURSOR;
if((yych = *YYCURSOR) == '*') goto yy92;
yy34:
#line 196 "scanner.fs.re"
{ RETURN(*tok); }
-#line 363 "<stdout>"
+#line 361 "<stdout>"
yy35:
++YYCURSOR;
if((yych = *YYCURSOR) == '/') goto yy90;
#line 198 "scanner.fs.re"
{ yylval.op = *tok;
RETURN(CLOSE); }
-#line 371 "<stdout>"
+#line 369 "<stdout>"
yy37:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
yy38:
#line 183 "scanner.fs.re"
{ fatal("unterminated string constant (missing \")"); }
-#line 379 "<stdout>"
+#line 377 "<stdout>"
yy39:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
yy40:
#line 184 "scanner.fs.re"
{ fatal("unterminated string constant (missing ')"); }
-#line 387 "<stdout>"
+#line 385 "<stdout>"
yy41:
yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
yy42:
#line 194 "scanner.fs.re"
{ fatal("unterminated range (missing ])"); }
-#line 397 "<stdout>"
+#line 395 "<stdout>"
yy43:
yych = *++YYCURSOR;
goto yy34;
{ cur = cursor;
yylval.symbol = Symbol::find(token());
return ID; }
-#line 413 "<stdout>"
+#line 411 "<stdout>"
yy47:
yych = *++YYCURSOR;
goto yy61;
yylval.regexp = mkDot();
return RANGE;
}
-#line 424 "<stdout>"
+#line 422 "<stdout>"
yy50:
++YYCURSOR;
yych = *YYCURSOR;
yy51:
#line 234 "scanner.fs.re"
{ goto scan; }
-#line 432 "<stdout>"
+#line 430 "<stdout>"
yy52:
++YYCURSOR;
yy53:
pos = cursor; cline++;
goto scan;
}
-#line 441 "<stdout>"
+#line 439 "<stdout>"
yy54:
++YYCURSOR;
if((yych = *YYCURSOR) == 0x0A) goto yy57;
fatal(msg.str().c_str());
goto scan;
}
-#line 453 "<stdout>"
+#line 451 "<stdout>"
yy56:
yych = *++YYCURSOR;
goto yy55;
yylval.str = new Str(token());
return CONFIG;
}
-#line 546 "<stdout>"
+#line 544 "<stdout>"
yy70:
++YYCURSOR;
YYSETSTATE(6);
{ cur = cursor;
yylval.regexp = ranToRE(token());
return RANGE; }
-#line 590 "<stdout>"
+#line 588 "<stdout>"
yy77:
++YYCURSOR;
YYSETSTATE(9);
{ cur = cursor;
yylval.regexp = invToRE(token());
return RANGE; }
-#line 605 "<stdout>"
+#line 603 "<stdout>"
yy80:
++YYCURSOR;
YYSETSTATE(10);
{ cur = cursor;
yylval.regexp = strToCaseInsensitiveRE(token());
return STRING; }
-#line 633 "<stdout>"
+#line 631 "<stdout>"
yy85:
++YYCURSOR;
YYSETSTATE(12);
{ cur = cursor;
yylval.regexp = strToRE(token());
return STRING; }
-#line 661 "<stdout>"
+#line 659 "<stdout>"
yy90:
++YYCURSOR;
#line 172 "scanner.fs.re"
{ tok = cursor;
RETURN(0); }
-#line 667 "<stdout>"
+#line 665 "<stdout>"
yy92:
++YYCURSOR;
#line 169 "scanner.fs.re"
{ depth = 1;
goto comment; }
-#line 673 "<stdout>"
+#line 671 "<stdout>"
yy94:
yych = *++YYCURSOR;
if(yych == ',') goto yy108;
yy98:
#line 216 "scanner.fs.re"
{ fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); }
-#line 698 "<stdout>"
+#line 696 "<stdout>"
yy99:
++YYCURSOR;
#line 204 "scanner.fs.re"
{ yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = atoi((char *)tok+1);
RETURN(CLOSESIZE); }
-#line 705 "<stdout>"
+#line 703 "<stdout>"
yy101:
yyaccept = 6;
yych = *(YYMARKER = ++YYCURSOR);
{ yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = -1;
RETURN(CLOSESIZE); }
-#line 717 "<stdout>"
+#line 715 "<stdout>"
yy104:
++YYCURSOR;
YYSETSTATE(15);
{ yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = MAX(yylval.extop.minsize,atoi(strchr((char *)tok, ',')+1));
RETURN(CLOSESIZE); }
-#line 732 "<stdout>"
+#line 730 "<stdout>"
yy108:
yyaccept = 6;
yych = *(YYMARKER = ++YYCURSOR);
#line 201 "scanner.fs.re"
{ yylval.op = '*';
RETURN(CLOSE); }
-#line 743 "<stdout>"
+#line 741 "<stdout>"
}
#line 247 "scanner.fs.re"
code:
-#line 750 "<stdout>"
+#line 748 "<stdout>"
{
YYSETSTATE(16);
return CODE;
}
goto code; }
-#line 782 "<stdout>"
+#line 780 "<stdout>"
yy115:
++YYCURSOR;
#line 257 "scanner.fs.re"
{ ++depth;
goto code; }
-#line 788 "<stdout>"
+#line 786 "<stdout>"
yy117:
++YYCURSOR;
#line 259 "scanner.fs.re"
pos = cursor; cline++;
goto code;
}
-#line 796 "<stdout>"
+#line 794 "<stdout>"
yy119:
++YYCURSOR;
yy120:
#line 263 "scanner.fs.re"
{ goto code; }
-#line 802 "<stdout>"
+#line 800 "<stdout>"
yy121:
yych = *(YYMARKER = ++YYCURSOR);
if(yych == 0x0A) goto yy120;
comment:
-#line 863 "<stdout>"
+#line 861 "<stdout>"
{
YYSETSTATE(21);
#line 279 "scanner.fs.re"
{ if(cursor == eof) RETURN(0);
goto comment; }
-#line 885 "<stdout>"
+#line 883 "<stdout>"
yy134:
yych = *++YYCURSOR;
if(yych == '*') goto yy138;
tok = pos = cursor; cline++;
goto comment;
}
-#line 897 "<stdout>"
+#line 895 "<stdout>"
yy137:
yych = *++YYCURSOR;
goto yy133;
{ ++depth;
fatal("ambiguous /* found");
goto comment; }
-#line 907 "<stdout>"
+#line 905 "<stdout>"
yy140:
++YYCURSOR;
#line 268 "scanner.fs.re"
goto scan;
else
goto comment; }
-#line 915 "<stdout>"
+#line 913 "<stdout>"
}
#line 281 "scanner.fs.re"
config:
-#line 922 "<stdout>"
+#line 920 "<stdout>"
{
YYSETSTATE(22);
yy145:
#line 285 "scanner.fs.re"
{ goto config; }
-#line 943 "<stdout>"
+#line 941 "<stdout>"
yy146:
++YYCURSOR;
yych = *YYCURSOR;
cur = cursor;
RETURN('=');
}
-#line 954 "<stdout>"
+#line 952 "<stdout>"
yy148:
++YYCURSOR;
#line 290 "scanner.fs.re"
{ fatal("missing '='"); }
-#line 959 "<stdout>"
+#line 957 "<stdout>"
yy150:
++YYCURSOR;
YYSETSTATE(23);
value:
-#line 986 "<stdout>"
+#line 984 "<stdout>"
{
YYSETSTATE(25);
iscfg = 0;
return VALUE;
}
-#line 1027 "<stdout>"
+#line 1025 "<stdout>"
yy157:
++YYCURSOR;
if((yych = *YYCURSOR) <= 0x0D) {
iscfg = 0;
return NUMBER;
}
-#line 1048 "<stdout>"
+#line 1046 "<stdout>"
yy159:
yych = *++YYCURSOR;
if(yych <= '0') goto yy163;