1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
/* Generated by re2c */
// re2c $INPUT -o $OUTPUT -if
// This test is for `getstate:re2c` with a list of blocks
// with mixed `use:re2c` and non-use blocks.
// `getstate:re2c:y` (start in y)
switch (YYGETSTATE()) {
case 3: goto yyFillLabel3;
default: goto yy6;
}
// `getstate:re2c:z:x` (start in z)
switch (YYGETSTATE()) {
case 4: goto yyFillLabel4;
case 1: goto yyFillLabel1;
default: goto yy8;
}
// `getstate:re2c:y:x:z` (start in y)
switch (YYGETSTATE()) {
case 3: goto yyFillLabel3;
case 1: goto yyFillLabel1;
case 4: goto yyFillLabel4;
default: goto yy6;
}
// rules block w
// use block (expect a local state switch for this block only)
switch (YYGETSTATE()) {
case 0: goto yyFillLabel0;
default: goto yy0;
}
yy0:
if (YYLIMIT <= YYCURSOR) {
YYSETSTATE(0);
YYFILL(1);
}
yyFillLabel0:
++YYCURSOR;
YYSETSTATE(-1);
{ w }
// global block x (no start label)
if (YYLIMIT <= YYCURSOR) {
YYSETSTATE(1);
YYFILL(1);
}
yyFillLabel1:
++YYCURSOR;
YYSETSTATE(-1);
{ x }
// use block (expect a local state switch for this block only)
switch (YYGETSTATE()) {
case 2: goto yyFillLabel2;
default: goto yy4;
}
yy4:
if (YYLIMIT <= YYCURSOR) {
YYSETSTATE(2);
YYFILL(1);
}
yyFillLabel2:
++YYCURSOR;
YYSETSTATE(-1);
{ w }
// global block y (with start label)
yy6:
if (YYLIMIT <= YYCURSOR) {
YYSETSTATE(3);
YYFILL(1);
}
yyFillLabel3:
++YYCURSOR;
YYSETSTATE(-1);
{ y }
// local block z (with start label)
yy8:
if (YYLIMIT <= YYCURSOR) {
YYSETSTATE(4);
YYFILL(1);
}
yyFillLabel4:
++YYCURSOR;
YYSETSTATE(-1);
{ z }
// the same directives at the end of file (in different order)
// should be no different from the ones at the beginning of the file
// `getstate:re2c:y:x:z` (start in y)
switch (YYGETSTATE()) {
case 3: goto yyFillLabel3;
case 1: goto yyFillLabel1;
case 4: goto yyFillLabel4;
default: goto yy6;
}
// `getstate:re2c:z:x` (start in z)
switch (YYGETSTATE()) {
case 4: goto yyFillLabel4;
case 1: goto yyFillLabel1;
default: goto yy8;
}
// `getstate:re2c:y` (start in y)
switch (YYGETSTATE()) {
case 3: goto yyFillLabel3;
default: goto yy6;
}
|