assert(false);
}
-// POSIX disambiguation for orbit tags: compare by orders
-// and tag histories. Lookahead may consist of multiple orbit subhistories
-// (each containing either a single bottom value, or one or many cursor
-// values); because of the shortest-path algorithm earlier subhistories
-// do not necessarily coincide, so we cannot just compare the last pair
-// of subhistories.
-// see note [POSIX orbit tags]
-static int32_t cmp_orbit(const clos_t &x, const clos_t &y, size_t t, Tagpool &tagpool)
-{
- const tagver_t
- ox = tagpool[x.order][t],
- oy = tagpool[y.order][t];
- if (ox < oy) return -1;
- if (ox > oy) return 1;
- return tagpool.history.compare_orbit(x.tlook, y.tlook, t);
-}
-
-// POSIX disambiguation for opening/closing tags: maximize (first lookahead,
-// then orders). Lookahead may consist of multiple subhistories (each
-// containing exactly one lookahead item: cursor or bottom).
-// Comparing the last values is not enough: because of the shortest-path
-// algorithm mismatch may occur at some earlier point (not at the last pair
-// of subhistories), in which case we still need to re-run the search.
-static int32_t cmp_max(const clos_t &x, const clos_t &y, size_t t, Tagpool &tagpool)
-{
- int32_t cmp = tagpool.history.compare_max(x.tlook, y.tlook, t);
- if (cmp != 0) return cmp;
- tagver_t vx = -tagpool[x.order][t], vy = -tagpool[y.order][t];
- if (vx > vy) return -1;
- if (vx < vy) return 1;
- return 0;
-}
-
// leftmost greedy disambiguation: order equals item's position
// in leftmost NFA traversal (it's the same for all tags)
static int32_t cmp_leftmost(const clos_t &x, const clos_t &y, Tagpool &tagpool)
if (cmp > 0) return true;
return false;
} else {
+ tagtree_t &h = tagpool.history;
for (size_t t = 0; t < tagpool.ntags; ++t) {
- const int32_t cmp = orbit(tags[t])
- ? cmp_orbit(c1, c2, t, tagpool)
- : cmp_max(c1, c2, t, tagpool);
+ const hidx_t i1 = c1.tlook, i2 = c2.tlook;
+ const tagver_t
+ o1 = -tagpool[c1.order][t],
+ o2 = -tagpool[c2.order][t];
+ const int32_t cmp = h.compare_histories(i1, i2, o1, o2, t, orbit(tags[t]));
if (cmp < 0) return false;
if (cmp > 0) return true;
}
* This part of the algorithm was invented by Christopher Kuklewicz.
*/
-struct cmp_orbit_t
+struct cmp_posix_t
{
Tagpool &tagpool;
size_t tag;
+ bool orbit;
bool operator()(cclositer_t x, cclositer_t y)
- { return cmp_orbit(*x, *y, tag, tagpool) < 0; }
-};
-
-struct cmp_max_t
-{
- Tagpool &tagpool;
- size_t tag;
- bool operator()(cclositer_t x, cclositer_t y)
- { return cmp_max(*x, *y, tag, tagpool) < 0; }
+ {
+ const hidx_t i1 = x->tlook, i2 = y->tlook;
+ const tagver_t
+ o1 = -tagpool[x->order][tag],
+ o2 = -tagpool[y->order][tag];
+ return tagpool.history.compare_last_subhistories(i1, i2, o1, o2, tag, orbit) < 0;
+ }
};
struct cmp_leftmost_t
}
} else {
for (size_t t = 0; t < ntag; ++t) {
- if (orbit(tags[t])) {
- cmp_orbit_t cmp = {tagpool, t};
- assign_orders(ps, pe, os0, cmp);
- } else {
- cmp_max_t cmp = {tagpool, t};
- assign_orders(ps, pe, os0, cmp);
- }
+ cmp_posix_t cmp = {tagpool, t, orbit(tags[t])};
+ assign_orders(ps, pe, os0, cmp);
o = os;
for (c = b; c != e; ++c, o += ntag) {
o[t] = os0[std::find(ps, pe, c) - ps];
#include <assert.h>
+#include <stdlib.h>
#include <string.h>
#include "src/dfa/tagtree.h"
namespace re2c
{
+static const tagver_t DELIM = TAGVER_CURSOR - 1;
+
tagtree_t::tagtree_t(): nodes(), path1(), path2() {}
tagver_t tagtree_t::elem(hidx_t i) const { return nodes[i].elem; }
}
}
-// cut out a list of subhistories of this tag separated by occurences
-// of higher-priority tags (separator has the highest value: 2, elements
-// have lower values: 1 for cursor and 0 for bottom --- this way comparison
-// will stop at separator and shorter subhistory will dominate).
-static void subhistory_list(const tagtree_t &history,
- std::vector<tagver_t> &path, hidx_t idx, size_t tag)
-{
- path.clear();
- hidx_t i = idx;
- for (;;) {
- for (; i != HROOT && history.tag(i) != tag; i = history.pred(i));
- if (i == HROOT) break;
- path.push_back(2);
- for (; i != HROOT && history.tag(i) >= tag; i = history.pred(i)) {
- if (history.tag(i) == tag) {
- path.push_back(history.elem(i) == TAGVER_CURSOR ? 1 : 0);
- }
- }
- }
-}
-
static int32_t compare_reversed(
const std::vector<tagver_t> &h1,
const std::vector<tagver_t> &h2)
return compare_reversed(path1, path2);
}
-int32_t tagtree_t::compare_orbit(hidx_t x, hidx_t y, size_t t)
+static size_t boundary_tag(size_t tag)
{
- subhistory_list(*this, path1, x, t);
- subhistory_list(*this, path2, y, t);
- return compare_reversed(path1, path2);
+ // for start tags, return itself; for end tags, return start tag
+ // (start tags have even numbers, end tags have odd numbers)
+ return tag & ~1u;
}
-int32_t tagtree_t::compare_max(hidx_t x, hidx_t y, size_t t)
+// returns all subhistories of the given tag as one list (individual
+// subhistories are separated by delimiter)
+static int32_t subhistory_list(const tagtree_t &history,
+ std::vector<tagver_t> &path, hidx_t idx, size_t tag)
{
- // compare starting from tail: at the first mismatch maximal value
- // wins; if one subhistory is shorter, it's last value is assumed
- // to be zero, so that comparison depends on the next value of the
- // longer subgistory
+ path.clear();
+ int32_t nsub = 0;
+ hidx_t i = idx;
+
+ const size_t bound = boundary_tag(tag);
+ path.push_back(DELIM);
for (;;) {
- for (; x != HROOT && tag(x) != t; x = pred(x));
- for (; y != HROOT && tag(y) != t; y = pred(y));
- if (x == HROOT && y == HROOT) return 0;
- if (x == HROOT) return (elem(y) == TAGVER_BOTTOM ? -1 : 1);
- if (y == HROOT) return (elem(x) == TAGVER_BOTTOM ? 1 : -1);
- if (elem(x) > elem(y)) return -1;
- if (elem(x) < elem(y)) return 1;
- x = pred(x); y = pred(y);
+ for (; i != HROOT && history.tag(i) >= bound; i = history.pred(i)) {
+ if (history.tag(i) == tag) {
+ path.push_back(history.elem(i));
+ }
+ }
+ if (i == HROOT) break;
+ ++nsub;
+ path.push_back(DELIM);
+ for (; i != HROOT && history.tag(i) != tag; i = history.pred(i));
}
+
+ return nsub;
+}
+
+// Lookahead may consist of multiple subhistories (each containing either
+// a single bottom value, or one or more cursor values (exactly one for
+// non-orbit subhistories). Because of the shortest-path algorithm earlier
+// subhistories do not necessarily coincide, so comparing only the last
+// pair of subhistories is not enough.
+// see note [POSIX orbit tags]
+int32_t tagtree_t::compare_histories(hidx_t x, hidx_t y,
+ tagver_t ox, tagver_t oy, size_t t, bool orbit)
+{
+ const int32_t
+ n1 = subhistory_list(*this, path1, x, t),
+ n2 = subhistory_list(*this, path2, y, t);
+
+ assert(n1 == n2);
+ if (orbit) {
+ path1.push_back(ox);
+ path2.push_back(oy);
+ } else {
+ if (path1.back() == DELIM) path1.push_back(ox);
+ if (path2.back() == DELIM) path2.push_back(oy);
+ }
+
+ std::vector<tagver_t>::const_reverse_iterator
+ i1 = path1.rbegin(), e1 = path1.rend(),
+ i2 = path2.rbegin(), e2 = path2.rend();
+ for (;;) {
+ if (i1 == e1 && i2 == e2) return 0;
+ assert(i1 != e1 && i2 != e2);
+ const tagver_t v1 = *i1++, v2 = *i2++;
+ if (v1 == DELIM && v2 == DELIM) continue;
+ if (v1 == DELIM) return -1;
+ if (v2 == DELIM) return 1;
+ if (v1 > v2) return -1;
+ if (v1 < v2) return 1;
+ }
+}
+
+static void last_subhistory(const tagtree_t &history, std::vector<tagver_t> &path,
+ hidx_t idx, tagver_t order, size_t tag, bool orbit)
+{
+ path.clear();
+ hidx_t i = idx;
+ const size_t bound = boundary_tag(tag);
+ for (; i != HROOT && history.tag(i) >= bound; i = history.pred(i)) {
+ if (history.tag(i) == tag) {
+ path.push_back(history.elem(i));
+ }
+ }
+ if (i == HROOT && (orbit || path.empty())) {
+ path.push_back(order);
+ }
+}
+
+int32_t tagtree_t::compare_last_subhistories(hidx_t x, hidx_t y,
+ tagver_t ox, tagver_t oy, size_t t, bool orbit)
+{
+ last_subhistory(*this, path1, x, ox, t, orbit);
+ last_subhistory(*this, path2, y, oy, t, orbit);
+ return compare_reversed(path1, path2);
}
tagver_t tagtree_t::last(hidx_t i, size_t t) const
size_t tag(hidx_t i) const;
hidx_t push(hidx_t i, size_t t, tagver_t v);
int32_t compare_plain(hidx_t x, hidx_t y, size_t t);
- int32_t compare_orbit(hidx_t x, hidx_t y, size_t t);
- int32_t compare_max(hidx_t x, hidx_t y, size_t t);
+ int32_t compare_histories(hidx_t x, hidx_t y, tagver_t ox, tagver_t oy, size_t t, bool orbit);
+ int32_t compare_last_subhistories(hidx_t x, hidx_t y, tagver_t ox, tagver_t oy, size_t t, bool orbit);
tagver_t last(hidx_t i, size_t t) const;
FORBID_COPY(tagtree_t);
};
yych = *++YYCURSOR;
switch (yych) {
case 'b':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy5;
case 'c':
yyt1 = yyt2 = YYCURSOR;
switch (yych) {
case 'b': goto yy5;
case 'c':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy7;
default: goto yy4;
}
switch (yych) {
case 'b': goto yy5;
case 'c':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy7;
case 'd': goto yy9;
default: goto yy4;
{
const size_t yynmatch = 3;
const YYCTYPE *yypmatch[yynmatch * 2];
- yypmatch[2] = yyt1;
- yypmatch[4] = yyt2;
- yypmatch[0] = yyt1 - 1;
+ yypmatch[2] = yyt2;
+ yypmatch[4] = yyt1;
+ yypmatch[0] = yyt2 - 1;
yypmatch[1] = YYCURSOR;
- yypmatch[3] = yyt2;
+ yypmatch[3] = yyt1;
yypmatch[5] = YYCURSOR;
{}
}
{
YYCTYPE yych;
unsigned int yyaccept = 0;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch (yych) {
case 'a':
case 'b':
yyt3 = yyt4 = NULL;
yyt1 = yyt2 = yyt5 = YYCURSOR;
- goto yy5;
+ goto yy4;
default:
yyt3 = yyt4 = NULL;
yyt1 = yyt2 = yyt5 = YYCURSOR;
{}
}
yy3:
+ yych = *++YYCURSOR;
+ switch (yych) {
+ case 'b':
+ yyt3 = yyt4 = NULL;
+ yyt5 = YYCURSOR;
+ goto yy8;
+ default: goto yy7;
+ }
+yy4:
+ ++YYCURSOR;
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch (yych) {
+ case 'b': goto yy4;
+ default: goto yy2;
+ }
+yy6:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
+yy7:
switch (yych) {
case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
+ yyt5 = YYCURSOR;
+ goto yy6;
case 'b':
+ yyt2 = yyt5;
yyt3 = yyt4 = NULL;
yyt5 = YYCURSOR;
- goto yy7;
+ goto yy8;
default:
yyt3 = yyt4 = NULL;
yyt2 = yyt5 = YYCURSOR;
goto yy2;
}
-yy5:
- ++YYCURSOR;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- switch (yych) {
- case 'b': goto yy5;
- default: goto yy2;
- }
-yy7:
+yy8:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 'a':
yyt6 = YYCURSOR;
- goto yy8;
+ goto yy9;
case 'b':
yyt2 = yyt5;
- goto yy5;
+ goto yy4;
default:
yyt2 = yyt5;
goto yy2;
}
-yy8:
+yy9:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case 'b': goto yy10;
- default: goto yy9;
+ case 'b': goto yy11;
+ default: goto yy10;
}
-yy9:
+yy10:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
yyt2 = yyt5;
yyt4 = yyt5 = YYCURSOR;
goto yy2;
}
-yy10:
+yy11:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
case 'a':
yyt3 = yyt6;
yyt6 = YYCURSOR;
- goto yy8;
+ goto yy9;
case 'b':
yyt3 = yyt6;
yyt4 = yyt5 = YYCURSOR;
- goto yy5;
+ goto yy4;
default:
yyt3 = yyt6;
yyt4 = yyt5 = YYCURSOR;
{
YYCTYPE yych;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
++YYCURSOR;
-yy7:
+yy6:
{
const size_t yynmatch = 3;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[5] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
- goto yy7;
+ goto yy6;
}
}
{
YYCTYPE yych;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
++YYCURSOR;
-yy7:
+yy6:
{
const size_t yynmatch = 3;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[5] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
- goto yy7;
+ goto yy6;
}
}
{
YYCTYPE yych;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
yych = *++YYCURSOR;
yyt3 = YYCURSOR;
- goto yy10;
-yy7:
+ goto yy11;
+yy6:
{
const size_t yynmatch = 5;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[9] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
yyt3 = YYCURSOR;
- goto yy7;
+ goto yy6;
}
-yy9:
+yy10:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy10:
+yy11:
switch (yych) {
- case 'c': goto yy9;
- default: goto yy7;
+ case 'c': goto yy10;
+ default: goto yy6;
}
}
{
YYCTYPE yych;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
yych = *++YYCURSOR;
yyt3 = YYCURSOR;
- goto yy10;
-yy7:
+ goto yy11;
+yy6:
{
const size_t yynmatch = 5;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[9] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
yyt3 = YYCURSOR;
- goto yy7;
+ goto yy6;
}
-yy9:
+yy10:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy10:
+yy11:
switch (yych) {
- case 'c': goto yy9;
- default: goto yy7;
+ case 'c': goto yy10;
+ default: goto yy6;
}
}
{
YYCTYPE yych;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
++YYCURSOR;
-yy7:
+yy6:
{
const size_t yynmatch = 3;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[5] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
- goto yy7;
+ goto yy6;
}
}
{
YYCTYPE yych;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
++YYCURSOR;
-yy7:
+yy6:
{
const size_t yynmatch = 3;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[5] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
- goto yy7;
+ goto yy6;
}
}
{
YYCTYPE yych;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
yych = *++YYCURSOR;
yyt3 = YYCURSOR;
- goto yy10;
-yy7:
+ goto yy11;
+yy6:
{
const size_t yynmatch = 5;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[9] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
yyt3 = YYCURSOR;
- goto yy7;
+ goto yy6;
}
-yy9:
+yy10:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy10:
+yy11:
switch (yych) {
- case 'c': goto yy9;
- default: goto yy7;
+ case 'c': goto yy10;
+ default: goto yy6;
}
}
{
YYCTYPE yych;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
goto yy3;
case 'b':
yyt1 = yyt2 = YYCURSOR;
- goto yy6;
+ goto yy5;
default: goto yy2;
}
yy2:
{}
}
yy3:
- ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
+ yych = *++YYCURSOR;
switch (yych) {
- case 'a':
- yyt2 = YYCURSOR;
- goto yy3;
case 'b':
yyt3 = YYCURSOR;
- goto yy8;
- default: goto yy5;
+ goto yy9;
+ default: goto yy8;
}
-yy5:
+yy4:
YYCURSOR = YYMARKER;
goto yy2;
-yy6:
+yy5:
yych = *++YYCURSOR;
yyt3 = YYCURSOR;
- goto yy10;
-yy7:
+ goto yy11;
+yy6:
{
const size_t yynmatch = 5;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[9] = YYCURSOR;
{}
}
+yy7:
+ ++YYCURSOR;
+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
yy8:
+ switch (yych) {
+ case 'a':
+ yyt3 = YYCURSOR;
+ goto yy7;
+ case 'b':
+ yyt2 = yyt3;
+ yyt3 = YYCURSOR;
+ goto yy9;
+ default: goto yy4;
+ }
+yy9:
yych = *++YYCURSOR;
switch (yych) {
- case 'c': goto yy6;
+ case 'c': goto yy5;
default:
yyt2 = yyt3;
yyt3 = YYCURSOR;
- goto yy7;
+ goto yy6;
}
-yy9:
+yy10:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy10:
+yy11:
switch (yych) {
- case 'c': goto yy9;
- default: goto yy7;
+ case 'c': goto yy10;
+ default: goto yy6;
}
}
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt1 = yyt2 = YYCURSOR;
+ yyt1 = yyt3 = YYCURSOR;
goto yy3;
default:
yyt2 = yyt3 = NULL;
const size_t yynmatch = 2;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[0] = yyt1;
- yypmatch[2] = yyt2;
- yypmatch[3] = yyt3;
+ yypmatch[2] = yyt3;
+ yypmatch[3] = yyt2;
yypmatch[1] = YYCURSOR;
{}
}
switch (yych) {
case 'a': goto yy4;
default:
- yyt3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy2;
}
yy4:
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt2 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy3;
default:
- yyt3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy2;
}
}
yych = *(YYMARKER = YYCURSOR);
switch (yych) {
case 'a':
- yyt1 = yyt2 = yyt4 = YYCURSOR;
+ yyt1 = yyt4 = yyt5 = YYCURSOR;
goto yy3;
default:
yyt2 = yyt3 = yyt4 = yyt5 = NULL;
const size_t yynmatch = 3;
const YYCTYPE *yypmatch[yynmatch * 2];
yypmatch[0] = yyt1;
- yypmatch[2] = yyt2;
- yypmatch[3] = yyt3;
- yypmatch[4] = yyt4;
- yypmatch[5] = yyt5;
+ yypmatch[2] = yyt4;
+ yypmatch[3] = yyt2;
+ yypmatch[4] = yyt5;
+ yypmatch[5] = yyt3;
yypmatch[1] = YYCURSOR;
{}
}
yyt1 = YYCURSOR;
goto yy2;
case 1:
- yyt4 = yyt5 = NULL;
- yyt3 = YYCURSOR;
+ yyt3 = yyt5 = NULL;
+ yyt2 = YYCURSOR;
goto yy2;
default:
- yyt2 = yyt3;
- yyt4 = yyt5 = NULL;
- yyt3 = YYCURSOR;
+ yyt4 = yyt2;
+ yyt3 = yyt5 = NULL;
+ yyt2 = YYCURSOR;
goto yy2;
}
yy5:
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt2 = YYCURSOR;
+ yyt4 = YYCURSOR;
goto yy6;
default:
- yyt4 = yyt5 = NULL;
- yyt3 = YYCURSOR;
+ yyt3 = yyt5 = NULL;
+ yyt2 = YYCURSOR;
goto yy2;
}
yy6:
switch (yych) {
case 'a': goto yy7;
default:
- yyt2 = yyt3 = NULL;
- yyt5 = YYCURSOR;
+ yyt2 = yyt4 = NULL;
+ yyt3 = YYCURSOR;
goto yy2;
}
yy7:
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy8;
default:
- yyt4 = yyt5 = NULL;
- yyt3 = YYCURSOR;
+ yyt3 = yyt5 = NULL;
+ yyt2 = YYCURSOR;
goto yy2;
}
yy8:
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt2 = yyt4 = YYCURSOR;
+ yyt4 = yyt5 = YYCURSOR;
goto yy3;
default:
- yyt2 = yyt3;
- yyt4 = yyt5 = NULL;
- yyt3 = YYCURSOR;
+ yyt4 = yyt2;
+ yyt3 = yyt5 = NULL;
+ yyt2 = YYCURSOR;
goto yy2;
}
}