void gen_goto_if(OutputFile &o, uint32_t ind, bool &readCh,
const State *to, const DFA &dfa, const tagcmd_t &tags, bool restore_fallback);
void gen_settags(code_lines_t &code, const DFA &dfa, const tagcmd_t &tags, bool restore_fallback);
-std::string vartag_name(const std::string *name, size_t rule);
-std::string vartag_expr(const std::string *name, size_t rule);
-std::string vartag_name_fallback(const Tag &tag);
-std::string vartag_expr_fallback(const Tag &tag);
+std::string vartag_name(tagver_t ver);
+std::string vartag_expr(tagver_t ver);
+std::string vartag_name_fallback(tagver_t ver);
+std::string vartag_expr_fallback(tagver_t ver);
} // namespace re2c
const tagcmd_t &cmd, bool restore_fallback)
{
const bool generic = opts->input_api.type() == InputAPI::CUSTOM;
- const bool
+ const tagver_t
*set = dfa.tagpool[cmd.set],
*copy = dfa.tagpool[cmd.copy];
const std::valarray<Tag> &tags = dfa.tags;
// copy
for (size_t i = 0; i < ntags; ++i) {
- if (copy[i]) {
- const Tag &tag = tags[i];
+ const tagver_t v = copy[i];
+ if (v != TAGVER_ZERO) {
std::string
- x = vartag_expr(tag.name, tag.rule),
- y = vartag_expr_fallback(tag);
+ x = vartag_expr(v),
+ y = vartag_expr_fallback(v);
if (restore_fallback) std::swap(x, y);
line = generic
? opts->yycopytag + " (" + y + ", " + x + ");\n"
// set
if (generic) {
for (size_t i = 0; i < ntags; ++i) {
- if (set[i]) {
- const Tag &tag = tags[i];
- line = opts->yybackuptag + " ("
- + vartag_expr(tag.name, tag.rule) + ");\n";
+ const tagver_t v = set[i];
+ if (v != TAGVER_ZERO) {
+ line = opts->yybackuptag + " (" + vartag_expr(v) + ");\n";
code.push_back(line);
}
}
} else if (cmd.set != ZERO_TAGS) {
line = "";
for (size_t i = 0; i < ntags; ++i) {
- if (set[i]) {
- const Tag &tag = tags[i];
- line += vartag_expr(tag.name, tag.rule) + " = ";
+ const tagver_t v = set[i];
+ if (v != TAGVER_ZERO) {
+ line += vartag_expr(v) + " = ";
}
}
line += opts->yycursor + ";\n";
{
const bool generic = opts->input_api.type() == InputAPI::CUSTOM;
const std::valarray<Tag> &tags = dfa.tags;
+ const tagver_t *vers = dfa.tagpool[rule.tags];
// trailing context
if (rule.trail != Tag::NONE) {
o.wstring(opts->yycursor).ws(" = ").wstring(opts->yyctxmarker);
}
} else {
- const Tag &orig = tags[tag.var.orig];
- const std::string expr = vartag_expr(orig.name, orig.rule);
+ const std::string expr = vartag_expr(vers[rule.trail]);
if (generic) {
o.wstring(opts->yyrestoretag).ws(" (").wstring(expr).ws(")");
} else {
// to '(YYCURSOR - tag)'
o.wstring(opts->yycursor).ws(" - ").wu64(tag.fix.dist);
} else {
- const Tag &orig = tags[tags[tag.fix.base].var.orig];
- o.wstring(vartag_expr(orig.name, orig.rule))
- .ws(" - ").wu64(tag.fix.dist);
+ const tagver_t v = vers[tag.fix.base];
+ o.wstring(vartag_expr(v)).ws(" - ").wu64(tag.fix.dist);
}
o.ws(";\n");
continue;
}
// variable
- const Tag &orig = tags[tag.var.orig];
- const std::string expr = vartag_expr(orig.name, orig.rule);
+ const std::string expr = vartag_expr(vers[t]);
o.wind(ind);
if (generic) {
o.wstring(opts->yycopytag).ws(" (").wstring(*tag.name)
if (!oldstyle_ctxmarker) {
const size_t ntags = tags.size();
for (size_t i = 0; i < ntags; ++i) {
- const Tag &t = tags[i];
- if (t.type == Tag::VAR && t.var.orig == i) {
- tagnames.insert(vartag_name(t.name, t.rule));
- }
- if (t.name != NULL) {
- tagvars.insert(*t.name);
+ const std::string *name = tags[i].name;
+ if (name) {
+ tagvars.insert(*name);
}
}
- const bool *copy = tagpool[copy_tags];
+ for (tagver_t v = 1; v <= maxtagver; ++v) {
+ tagnames.insert(vartag_name(v));
+ }
+ const tagver_t *copy = tagpool[copy_tags];
for (size_t i = 0; i < ntags; ++i) {
- if (copy[i]) {
- tagnames.insert(vartag_name_fallback(tags[i]));
+ const tagver_t v = copy[i];
+ if (v != TAGVER_ZERO) {
+ tagnames.insert(vartag_name_fallback(v));
}
}
ob.tags.insert(tagnames.begin(), tagnames.end());
bWroteCondCheck = true;
}
-std::string vartag_name(const std::string *name, size_t rule)
+std::string vartag_name(tagver_t ver)
{
std::ostringstream s;
- s << opts->tags_prefix << rule;
- if (name != NULL) {
- s << *name;
- }
+ s << opts->tags_prefix << ver;
return s.str();
}
-std::string vartag_expr(const std::string *name, size_t rule)
+std::string vartag_expr(tagver_t ver)
{
- const std::string s = vartag_name(name, rule);
+ const std::string s = vartag_name(ver);
std::string e = opts->tags_expression;
strrreplace(e, "@@", s);
return e;
}
-std::string vartag_name_fallback(const Tag &tag)
+std::string vartag_name_fallback(tagver_t ver)
{
- const std::string name = (tag.name == NULL ? "" : *tag.name) + "_";
- return vartag_name(&name, tag.rule);
+ return vartag_name(ver) + "_";
}
-std::string vartag_expr_fallback(const Tag &tag)
+std::string vartag_expr_fallback(tagver_t ver)
{
- const std::string name = (tag.name == NULL ? "" : *tag.name) + "_";
- return vartag_expr(&name, tag.rule);
+ const std::string s = vartag_name_fallback(ver);
+ std::string e = opts->tags_expression;
+ strrreplace(e, "@@", s);
+ return e;
}
} // end namespace re2c
for (uint32_t j = 0; j < c.ranges.size(); ++j) {
o.wrange(c.ranges[j].first, c.ranges[j].second);
}
- const bool *tags = dfa.tagpool[c.tags.set];
+ const tagver_t *tags = dfa.tagpool[c.tags.set];
for (size_t j = 0; j < dfa.tagpool.ntags; ++j) {
- if (tags[j]) {
- const Tag &t = dfa.tags[dfa.tags[j].var.orig];
- o.ws("<").wstring(vartag_name(t.name, t.rule)).ws(">");
+ const tagver_t v = tags[j];
+ if (v != TAGVER_ZERO) {
+ o.ws("<").wstring(vartag_name(v)).ws(">");
}
}
o.ws("\"]\n");
, const std::string &n
, const std::string &c
, uint32_t l
+ , tagver_t maxver
)
: accepts ()
, skeleton (skel)
, need_backup (false)
, need_accept (false)
, oldstyle_ctxmarker (false)
+ , maxtagver (maxver)
{
const size_t nstates = dfa.states.size();
const size_t nchars = dfa.nchars;
bool need_backup;
bool need_accept;
bool oldstyle_ctxmarker;
+ tagver_t maxtagver;
DFA ( const dfa_t &dfa
, const std::vector<size_t> &fill
, const std::string &n
, const std::string &c
, uint32_t l
+ , tagver_t maxver
);
~DFA ();
void reorder();
void prepare();
- void calc_stats(uint32_t line, size_t used_tags);
+ void calc_stats(uint32_t line);
void emit (Output &, uint32_t &, bool, bool &);
private:
}
}
-void DFA::calc_stats(uint32_t line, size_t used_tags)
+void DFA::calc_stats(uint32_t line)
{
// calculate 'YYMAXFILL'
max_fill = 0;
// re2c should use old-style YYCTXMARKER for backwards compatibility.
// Note that with generic API fixed-length contexts are forbidden,
// which may cause additional overlaps.
- oldstyle_ctxmarker = used_tags == 1
+ oldstyle_ctxmarker = maxtagver == 1
&& copy_tags == ZERO_TAGS
&& !opts->tags;
// error if tags are not enabled, but we need them
if (!opts->tags
- && (used_tags > 1 || copy_tags != ZERO_TAGS)) {
+ && (maxtagver > 1 || copy_tags != ZERO_TAGS)) {
error("line %u: overlapping trailing contexts need "
"multiple context markers, use '-t, --tags' "
"option and '/*!tags:re2c ... */' directive",
insert_fallback_tags(dfa);
// try to minimize the number of tag variables
- const size_t used_tags = deduplicate_tags(dfa);
+ const tagver_t maxtagver = deduplicate_tags(dfa);
minimization(dfa);
fillpoints(dfa, fill);
// ADFA stands for 'DFA with actions'
- DFA *adfa = new DFA(dfa, fill, skeleton, cs, name, cond, line);
+ DFA *adfa = new DFA(dfa, fill, skeleton, cs, name, cond, line, maxtagver);
// see note [reordering DFA states]
adfa->reorder();
adfa->prepare();
// finally gather overall DFA statistics
- adfa->calc_stats(line, used_tags);
+ adfa->calc_stats(line);
// accumulate global statistics from this particular DFA
output.max_fill = std::max (output.max_fill, adfa->max_fill);
namespace re2c
{
-static void closure_one(closure_t &clos, Tagpool &tagpool, nfa_state_t *n, bool *tags, bool *badtags);
+static void closure_one(closure_t &clos, Tagpool &tagpool, nfa_state_t *n, tagver_t *tags, bool *badtags);
static void check_tags(const Tagpool &tagpool, size_t oldidx, size_t newidx, bool *badtags);
static bool compare_by_rule(const clos_t &c1, const clos_t &c2);
static void prune_final_items(closure_t &clos, std::valarray<Rule> &rules);
{
// build tagged epsilon-closure of the given set of NFA states
clos2.clear();
- bool *tags = tagpool.buffer1;
- std::fill(tags, tags + tagpool.ntags, false);
+ tagver_t *tags = tagpool.buffer1;
+ std::fill(tags, tags + tagpool.ntags, TAGVER_ZERO);
for (cclositer_t c = clos1.begin(); c != clos1.end(); ++c) {
closure_one(clos2, tagpool, c->state, tags, badtags);
}
* ambiguous. All tags are merged together; ambiguity is reported.
*/
void closure_one(closure_t &clos, Tagpool &tagpool,
- nfa_state_t *n, bool *tags, bool *badtags)
+ nfa_state_t *n, tagver_t *tags, bool *badtags)
{
// trace the first iteration of each loop:
// epsilon-loops may add ney tags and reveal conflicts
break;
case nfa_state_t::TAG: {
const size_t t = n->tag.info;
- const bool old = tags[t];
- tags[t] = true;
+ const tagver_t old = tags[t];
+ tags[t] = static_cast<tagver_t>(t + 1);
closure_one(clos, tagpool, n->tag.out, tags, badtags);
tags[t] = old;
break;
*/
void check_tags(const Tagpool &tagpool, size_t oldidx, size_t newidx, bool *badtags)
{
- const bool
+ const tagver_t
*oldtags = tagpool[oldidx],
*newtags = tagpool[newidx];
for (size_t i = 0; i < tagpool.ntags; ++i) {
- badtags[i] |= oldtags[i] ^ newtags[i];
+ badtags[i] |= oldtags[i] != newtags[i];
}
}
size_t merge_and_check_tags(const closure_t &clos, Tagpool &tagpool,
const std::valarray<Rule> &rules, bool *badtags)
{
- bool *tags = tagpool.buffer1;
- std::fill(tags, tags + tagpool.ntags, false);
+ tagver_t *tags = tagpool.buffer1;
+ std::fill(tags, tags + tagpool.ntags, TAGVER_ZERO);
size_t r = 0, lt = 0, ht;
for (cclositer_t c = clos.begin(), e = clos.end(); c != e;) {
- const bool *x = tagpool[c->tagidx];
+ const tagver_t *x = tagpool[c->tagidx];
// find next rule that occurs in closure
for (; r < c->state->rule; lt = rules[r].htag, ++r);
// merge tags of the 1st item belonging to this rule
for (size_t t = lt; t < ht; ++t) {
- tags[t] |= x[t];
+ tags[t] = x[t];
}
// check the remaining items with this for tag nondeterminism:
// if some tag differs from that of the 1st item, then it is
// nondeterministic (don't merge it, only note the conflict)
for (++c; c != e && c->state->rule == r; ++c) {
- const bool *y = tagpool[c->tagidx];
+ const tagver_t *y = tagpool[c->tagidx];
for (size_t t = lt; t < ht; ++t) {
badtags[t] |= y[t] != x[t];
}
void fillpoints(const dfa_t &dfa, std::vector<size_t> &fill);
void cutoff_dead_rules(dfa_t &dfa, size_t defrule, const std::string &cond);
void insert_fallback_tags(dfa_t &dfa);
-size_t deduplicate_tags(dfa_t &dfa);
+tagver_t deduplicate_tags(dfa_t &dfa);
} // namespace re2c
namespace re2c
{
-static void find_overwritten_tags(const dfa_t &dfa, size_t state, bool *been, bool *owrt);
+static void find_overwritten_tags(const dfa_t &dfa, size_t state, bool *been, tagver_t *owrt);
/* note [fallback tags]
*
*/
void find_overwritten_tags(const dfa_t &dfa, size_t state,
- bool *been, bool *owrt)
+ bool *been, tagver_t *owrt)
{
if (been[state]) return;
been[state] = true;
const size_t ntags = dfa.tags.size();
for (size_t c = 0; c < dfa.nchars; ++c) {
- const bool *tags = dfa.tagpool[s->tags[c].set];
+ const tagver_t *tags = dfa.tagpool[s->tags[c].set];
for (size_t t = 0; t < ntags; ++t) {
- owrt[t] |= tags[t];
+ const tagver_t v = tags[t];
+ if (v != TAGVER_ZERO) {
+ owrt[t] = v;
+ }
}
size_t dest = s->arcs[c];
nstates = dfa.states.size(),
ntags = dfa.tags.size();
bool *been = new bool[nstates];
- bool *total = dfa.tagpool.buffer2;
- std::fill(total, total + ntags, false);
+ tagver_t *total = dfa.tagpool.buffer2;
+ std::fill(total, total + ntags, TAGVER_ZERO);
for (size_t i = 0; i < nstates; ++i) {
dfa_state_t *s = dfa.states[i];
if (!s->fallback) continue;
- bool *owrt = dfa.tagpool.buffer1;
- std::fill(owrt, owrt + ntags, false);
+ tagver_t *owrt = dfa.tagpool.buffer1;
+ std::fill(owrt, owrt + ntags, TAGVER_ZERO);
std::fill(been, been + nstates, false);
find_overwritten_tags(dfa, i, been, owrt);
- const bool
+ const tagver_t
*fin = dfa.tagpool[dfa.rules[s->rule].tags],
*upd = dfa.tagpool[s->rule_tags.set];
for (size_t t = 0; t < ntags; ++t) {
- owrt[t] &= fin[t] && !upd[t];
- total[t] |= owrt[t];
+ if (fin[t] == TAGVER_ZERO || upd[t] != TAGVER_ZERO) {
+ owrt[t] = TAGVER_ZERO;
+ }
+ if (owrt[t] != TAGVER_ZERO) {
+ total[t] = owrt[t];
+ }
}
const size_t copy = dfa.tagpool.insert(owrt);
namespace re2c
{
+static void unpack(size_t nver, bool *vers, size_t ntag, const tagver_t *tags)
+{
+ memset(vers, 0, nver * sizeof(bool));
+ for (size_t t = 0; t < ntag; ++t) {
+ const tagver_t v = tags[t];
+ if (v != TAGVER_ZERO) {
+ vers[v] = true;
+ }
+ }
+}
+
static void forwprop(const dfa_t &dfa, bool *been, size_t state,
bool *live, const bool *need)
{
const size_t
nsym = dfa.nchars,
- ntag = dfa.tags.size();
+ nver = dfa.tags.size() + 1;
const dfa_state_t *s = dfa.states[state];
for (size_t c = 0; c < nsym; ++c) {
const size_t dest = s->arcs[c];
if (dest != dfa_t::NIL && dfa.states[dest]->fallthru) {
- bool *l = &live[(state * nsym + c) * ntag];
- for (size_t t = 0; t < ntag; ++t) {
- l[t] |= need[t];
+ bool *l = &live[(state * nsym + c) * nver];
+ for (size_t v = 0; v < nver; ++v) {
+ l[v] |= need[v];
}
forwprop(dfa, been, dest, live, need);
}
}
}
-static void liveness(const dfa_t &dfa, bool *live)
+static void liveness_analysis(const dfa_t &dfa, bool *live)
{
const size_t
nstate = dfa.states.size(),
nsym = dfa.nchars,
narc = nstate * nsym,
- ntag = dfa.tags.size();
- bool *l0 = dfa.tagpool.buffer1;
+ ntag = dfa.tags.size(),
+ nver = ntag + 1;
+ bool *buf1 = new bool[nver];
+ bool *buf2 = new bool[nver];
+ bool *been = new bool[nstate];
/* note [control flow equations for tag liveness]
*
* - all outgoing arcs from state s2
* - if state s2 is final, corresponding rule action
*/
- memset(live, 0, narc * ntag * sizeof(bool));
+ memset(live, 0, narc * nver * sizeof(bool));
for (bool loop = true; loop;) {
loop = false;
if (i == dfa_t::NIL) continue;
const dfa_state_t *s = dfa.states[i];
- bool *l = &live[a * ntag];
- memcpy(l0, l, ntag * sizeof(bool));
- memset(l, 0, ntag * sizeof(bool));
+ memset(buf1, 0, nver * sizeof(bool));
if (s->rule != Rule::NONE) {
- const bool
+ const tagver_t
*use = dfa.tagpool[dfa.rules[s->rule].tags],
*def = dfa.tagpool[s->rule_tags.set];
for (size_t t = 0; t < ntag; ++t) {
- l[t] |= use[t] && !def[t];
+ const tagver_t u = use[t], d = def[t];
+ if (u != TAGVER_ZERO && d == TAGVER_ZERO) {
+ buf1[u] = true;
+ }
}
}
for (size_t c = 0; c < nsym; ++c) {
- const bool
- *use = &live[(i * nsym + c) * ntag],
- *def = dfa.tagpool[s->tags[c].set];
- for (size_t t = 0; t < ntag; ++t) {
- l[t] |= use[t] && !def[t];
+ const bool *use = &live[(i * nsym + c) * nver];
+ unpack(nver, buf2, ntag, dfa.tagpool[s->tags[c].set]);
+ for (size_t v = 0; v < nver; ++v) {
+ buf1[v] |= use[v] && !buf2[v];
}
}
- loop |= memcmp(l, l0, ntag * sizeof(bool)) != 0;
+ bool *liv = &live[a * nver];
+ if (memcmp(liv, buf1, nver * sizeof(bool)) != 0) {
+ memcpy(liv, buf1, nver * sizeof(bool));
+ loop = true;
+ }
}
}
* state (see note [fallback states]) and until there remain
* any fallthrough paths from current state.
*/
- bool *been = new bool[nstate];
for (size_t i = 0; i < nstate; ++i) {
const dfa_state_t *s = dfa.states[i];
if (s->fallback) {
- const bool
+ const tagver_t
*use = dfa.tagpool[dfa.rules[s->rule].tags],
*def = dfa.tagpool[s->rule_tags.set];
+ memset(buf1, 0, nver * sizeof(bool));
for (size_t t = 0; t < ntag; ++t) {
- l0[t] = use[t] && !def[t];
+ const tagver_t u = use[t], d = def[t];
+ if (u != TAGVER_ZERO && d == TAGVER_ZERO) {
+ buf1[u] = true;
+ }
}
- std::fill(been, been + nstate, false);
- forwprop(dfa, been, i, live, l0);
+ memset(been, 0, nstate * sizeof(bool));
+ forwprop(dfa, been, i, live, buf1);
}
}
+
+ delete[] buf1;
+ delete[] buf2;
delete[] been;
}
-static void mask_dead(dfa_t &dfa, const bool *live)
+static void dead_code_elimination(dfa_t &dfa, const bool *live)
{
const size_t
nsym = dfa.nchars,
narc = dfa.states.size() * nsym,
- ntag = dfa.tags.size();
+ ntag = dfa.tags.size(),
+ nver = ntag + 1;
for (size_t a = 0; a < narc; ++a) {
const size_t
size_t *p = &s->tags[c].set;
if (*p != ZERO_TAGS) {
- const bool
- *liv = &live[a * ntag],
- *set = dfa.tagpool[*p];
- bool *set_liv = dfa.tagpool.buffer1;
+ const bool *liv = &live[a * nver];
+ const tagver_t *set = dfa.tagpool[*p];
+ tagver_t *set_liv = dfa.tagpool.buffer1;
for (size_t t = 0; t < ntag; ++t) {
- set_liv[t] = set[t] && liv[t];
+ const tagver_t v = set[t];
+ set_liv[t] = v != TAGVER_ZERO && liv[v]
+ ? v : TAGVER_ZERO;
}
*p = dfa.tagpool.insert(set_liv);
}
// tags that are updated here are pairwise incompatible
// with all tags that are alive, but not updated here
-static void interfere(bool *intrf, size_t ntag,
+static void interfere(bool *interf, size_t nver,
const bool *live, const bool *tags)
{
- for (size_t i = 0; i < ntag; ++i) {
+ for (size_t i = 0; i < nver; ++i) {
if (live[i] && !tags[i]) {
- for (size_t j = 0; j < ntag; ++j) {
+ for (size_t j = 0; j < nver; ++j) {
if (tags[j]) {
- intrf[i * ntag + j] = intrf[j * ntag + i] = true;
+ interf[i * nver + j] = interf[j * nver + i] = true;
}
}
}
}
}
-static void interference(const dfa_t &dfa,
- const bool *live, bool *intrf)
+static void interference_table(const dfa_t &dfa,
+ const bool *live, bool *interf)
{
const size_t
nstate = dfa.states.size(),
ntag = dfa.tags.size(),
+ nver = ntag + 1,
nsym = dfa.nchars;
+ bool *buf1 = new bool[nver];
+ bool *buf2 = new bool[nver];
- memset(intrf, 0, ntag * ntag * sizeof(bool));
+ memset(interf, 0, nver * nver * sizeof(bool));
for (size_t i = 0; i < nstate; ++i) {
const dfa_state_t *s = dfa.states[i];
if (s->rule != Rule::NONE) {
- const bool
- *liv = dfa.tagpool[dfa.rules[s->rule].tags],
- *set = dfa.tagpool[s->rule_tags.set];
- interfere(intrf, ntag, liv, set);
+ unpack(nver, buf1, ntag, dfa.tagpool[dfa.rules[s->rule].tags]);
+ unpack(nver, buf2, ntag, dfa.tagpool[s->rule_tags.set]);
+ interfere(interf, nver, buf1, buf2);
}
for (size_t c = 0; c < nsym; ++c) {
const size_t x = s->tags[c].set;
if (x != ZERO_TAGS) {
- const bool
- *liv = &live[(i * nsym + c) * ntag],
- *set = dfa.tagpool[x];
- interfere(intrf, ntag, liv, set);
+ const bool *liv = &live[(i * nsym + c) * nver];
+ unpack(nver, buf1, ntag, dfa.tagpool[x]);
+ interfere(interf, nver, liv, buf1);
}
}
}
- // fixed tags should not participate in deduplication, so
- // each fixed tag is incompatible with all other tags
- for (size_t i = 0; i < ntag; ++i) {
- if (dfa.tags[i].type == Tag::FIX) {
- for (size_t j = 0; j < ntag; ++j) {
- intrf[i * ntag + j]
- = intrf[j * ntag + i]
- = j != i;
- }
- }
- }
+ delete[] buf1;
+ delete[] buf2;
}
/* We have a binary relation on the set of all tags
* We build just some cover (not necessarily minimal).
* The algorithm takes quadratic (in the number of tags) time.
*/
-static size_t equivalence_classes(const dfa_t &dfa,
- const bool *intrf, size_t *represent)
+static tagver_t version_allocation(const dfa_t &dfa,
+ const bool *interf, tagver_t *ver2new)
{
- static const size_t END = std::numeric_limits<size_t>::max();
- const size_t ntags = dfa.tags.size();
- std::vector<size_t>
- head(ntags, END), // list of representatives
- next(ntags, END); // list of tags mapped to the same representative
-
- // skip the 1st tag, it maps to itself
- memset(represent, 0, ntags * sizeof(size_t));
- for (size_t c = 1; c < ntags; ++c) {
- size_t h;
- for (h = 0; h != END; h = head[h]) {
- size_t n;
+ const size_t
+ END = std::numeric_limits<size_t>::max(),
+ nver = dfa.tags.size() + 1;
+ size_t *head = new size_t[nver]; // list of class representatives
+ size_t *next = new size_t[nver]; // list of class members
+ size_t h0 = END, h, n;
+
+ std::fill(head, head + nver, END);
+ std::fill(next, next + nver, END);
+ for (size_t v = 0; v < nver; ++v) {
+ const bool *interfv = &interf[v * nver];
+
+ // try all existing classes
+ for (h = h0; h != END; h = head[h]) {
+
+ // check interference with class members
for (n = h; n != END; n = next[n]) {
- if (intrf[c * ntags + n]) {
- break;
- }
+ if (interfv[n]) break;
}
+
+ // no interference; add to class
if (n == END) {
- represent[c] = h;
- next[c] = next[h];
- next[h] = c;
+ next[v] = next[h];
+ next[h] = v;
break;
}
}
+
+ // make new equivalence class
if (h == END) {
- represent[c] = c;
- head[c] = head[0];
- head[0] = c;
+ head[v] = h0;
+ h0 = v;
}
}
- size_t nreps = 0;
- for (size_t i = 0; i < ntags; ++i) {
- if (dfa.tags[i].type == Tag::VAR && represent[i] == i) {
- ++nreps;
+ tagver_t maxver = 0;
+ for (h = h0; h != END; h = head[h]) {
+ ++maxver;
+ for (n = h; n != END; n = next[n]) {
+ ver2new[n] = maxver;
}
}
- return nreps;
+
+ delete[] head;
+ delete[] next;
+
+ return maxver;
}
-static void subst(Tagpool &tagpool, size_t *ptags, const size_t *represent)
+static void rename(Tagpool &tagpool, size_t &tags,
+ const tagver_t *ver2new, bool unify)
{
+ if (tags == ZERO_TAGS) return;
+
+ const tagver_t *oldver = tagpool[tags];
+ tagver_t *newver = tagpool.buffer1;
const size_t ntag = tagpool.ntags;
- const bool *tags = tagpool[*ptags];
- bool *subs = tagpool.buffer1;
- memset(subs, 0, ntag * sizeof(bool));
+
for (size_t t = 0; t < ntag; ++t) {
- if (tags[t]) {
- subs[represent[t]] = true;
- }
+ const tagver_t v = oldver[t];
+ newver[t] = v != TAGVER_ZERO
+ ? ver2new[v]
+ : v;
+ }
+
+ // for transition tags, we don't care how versions map to
+ // tags: identical sets of versions should compare equal
+ // this doesn't apply to final tag versions in rules
+ if (unify) {
+ tagver_t *e = newver + ntag;
+ std::sort(newver, e);
+ std::fill(std::unique(newver, e), e, TAGVER_ZERO);
}
- *ptags = tagpool.insert(subs);
+
+ tags = tagpool.insert(newver);
}
-static void substitute(dfa_t &dfa, const size_t *represent)
+static void version_renaming(dfa_t &dfa,
+ const tagver_t *ver2new, tagver_t maxver)
{
+ const tagver_t oldmax = static_cast<tagver_t>(dfa.tags.size());
+ if (maxver >= oldmax) {
+ assert(maxver == oldmax);
+ return;
+ }
+
+ Tagpool &tagpool = dfa.tagpool;
const size_t
nstates = dfa.states.size(),
- ntags = dfa.tags.size();
+ nrule = dfa.rules.size();
for (size_t i = 0; i < nstates; ++i) {
dfa_state_t *s = dfa.states[i];
for (size_t c = 0; c < dfa.nchars; ++c) {
- subst(dfa.tagpool, &s->tags[c].set, represent);
- subst(dfa.tagpool, &s->tags[c].copy, represent);
+ rename(tagpool, s->tags[c].set, ver2new, true);
+ rename(tagpool, s->tags[c].copy, ver2new, true);
}
- subst(dfa.tagpool, &s->rule_tags.set, represent);
- subst(dfa.tagpool, &s->rule_tags.copy, represent);
+ rename(tagpool, s->rule_tags.set, ver2new, true);
+ rename(tagpool, s->rule_tags.copy, ver2new, true);
}
- subst(dfa.tagpool, &dfa.copy_tags, represent);
+ rename(dfa.tagpool, dfa.copy_tags, ver2new, true);
+ for (size_t i = 0; i < nrule; ++i) {
+ rename(tagpool, dfa.rules[i].tags, ver2new, false);
+ }
+}
- for (size_t i = 0; i < ntags; ++i) {
- Tag &t = dfa.tags[i];
- if (t.type == Tag::VAR) {
- t.var.orig = represent[i];
+static size_t count_vartags(const std::valarray<Tag> &tags)
+{
+ size_t nvar = 0, ntag = tags.size();
+ for (size_t t = 0; t < ntag; ++t) {
+ if (tags[t].type == Tag::VAR) {
+ ++nvar;
}
}
+ return nvar;
}
-size_t deduplicate_tags(dfa_t &dfa)
+tagver_t deduplicate_tags(dfa_t &dfa)
{
- const size_t ntag = dfa.tags.size();
- if (ntag == 0) return 0;
-
- bool *live = new bool[dfa.states.size() * dfa.nchars * ntag];
- bool *interfere = new bool[ntag * ntag];
- size_t *represent = new size_t[ntag];
-
- liveness(dfa, live);
- mask_dead(dfa, live);
- interference(dfa, live, interfere);
- const size_t nrep = equivalence_classes(dfa, interfere, represent);
- if (nrep < ntag) {
- substitute(dfa, represent);
- }
+ if (count_vartags(dfa.tags) == 0) return 0;
+
+ const size_t
+ narc = dfa.states.size() * dfa.nchars,
+ nver = dfa.tags.size() + 1;
+ bool *live = new bool[narc * nver];
+ bool *interf = new bool[nver * nver];
+ tagver_t *rename = new tagver_t[nver];
+
+ liveness_analysis(dfa, live);
+ dead_code_elimination(dfa, live);
+ interference_table(dfa, live, interf);
+ const tagver_t maxver = version_allocation(dfa, interf, rename);
+ version_renaming(dfa, rename, maxver);
delete[] live;
- delete[] interfere;
- delete[] represent;
+ delete[] interf;
+ delete[] rename;
- return nrep;
+ return maxver;
}
} // namespace re2c
rule.htag = t;
// mark *all* variable tags, including trailing context
- bool *mask = new bool[nt]();
+ tagver_t *vers = tagpool.buffer1;
+ std::fill(vers, vers + nt, TAGVER_ZERO);
for (size_t i = rule.ltag; i < rule.htag; ++i) {
- mask[i] = tags[i].type == Tag::VAR;
+ if (tags[i].type == Tag::VAR) {
+ vers[i] = static_cast<tagver_t>(i + 1);
+ }
}
- rule.tags = tagpool.insert(mask);
- delete[] mask;
+ rule.tags = tagpool.insert(vers);
// tags in trailing context are forbidden (they make no sense),
// and since tags are constructed in reversed order, this implies
dist = VARDIST;
make_tags_var(nrule, tags, tagidx, re->iter, dist);
break;
- case RegExp::TAG: {
- const size_t orig = tagidx;
- init_var_tag(tags[tagidx++], nrule, re->tag, orig);
+ case RegExp::TAG:
+ init_var_tag(tags[tagidx++], nrule, re->tag);
break;
- }
}
}
const std::string *name = re->tag;
if (dist == VARDIST) {
base = tagidx;
- init_var_tag(tags[tagidx++], nrule, name, base);
+ init_var_tag(tags[tagidx++], nrule, name);
dist = 0;
} else {
init_fix_tag(tags[tagidx++], nrule, name, base, dist);
tail = arcs.rbegin(),
head = arcs.rend();
for (; tail != head; ++tail) {
- const size_t rule_idx = skel.nodes[*tail].rule;
- if (rule_idx == Rule::NONE) {
- continue;
- }
+ const Node &node = skel.nodes[*tail];
+ if (node.rule == Rule::NONE) continue;
+
size_t len = static_cast<size_t>(head - tail) - 1;
- const size_t trail = skel.rules[rule_idx].trail;
- if (trail == Tag::NONE) {
- return len;
- }
+ const size_t trail = node.trail;
+ if (trail == Tag::NONE) return len;
+
const Tag &tag = skel.tags[trail];
- switch (tag.type) {
- case Tag::VAR:
- for (; tail != head; ++tail) {
- if (skel.nodes[*tail].tags[trail]) {
- return static_cast<size_t>(head - tail) - 1;
- }
+ if (tag.type == Tag::FIX) {
+ return len - tag.fix.dist;
+ } else {
+ for (; tail != head; ++tail) {
+ if (skel.tagpool[skel.nodes[*tail].tags][trail] == node.trver) {
+ return static_cast<size_t>(head - tail) - 1;
}
- assert(false);
- case Tag::FIX:
- return len - tag.fix.dist;
+ }
+ assert(false);
}
}
return 0;
: arcs()
, arcsets()
, rule(Rule::NONE)
- , tags(NULL)
+ , trail(Tag::NONE)
+ , trver(TAGVER_ZERO)
+ , tags(ZERO_TAGS)
{}
-Node::~Node()
-{
- delete[] tags;
-}
-
-void Node::init(const bool *ts, size_t r,
+void Node::init(size_t ts, size_t r, size_t tr, tagver_t tv,
const std::vector<std::pair<size_t, uint32_t> > &a)
{
rule = r;
tags = ts;
+ trail = tr;
+ trver = tv;
uint32_t lb = 0;
std::vector<std::pair<size_t, uint32_t> >::const_iterator
, nodes_count(dfa.states.size() + 1) // +1 for default state
, nodes(new Node[nodes_count])
, sizeof_key(8)
- , rules(dfa.rules)
, defrule(def)
, tags(dfa.tags)
+ , tagpool(dfa.tagpool)
{
const size_t nc = cs.size() - 1;
// in skeleton we are only interested in trailing contexts
// which may be attributed to states rather than transitions
// trailing context also cannot have fallback tag
- Tagpool &tagpool = dfa.tagpool;
- const size_t ntag = tagpool.ntags;
- bool *tags = new bool[ntag];
- memcpy(tags, tagpool[s->rule_tags.set], ntag * sizeof(bool));
+ const size_t ntag = tags.size();
+ tagver_t *buf = tagpool.buffer1;
+ memcpy(buf, tagpool[s->rule_tags.set], ntag * sizeof(tagver_t));
for (size_t c = 0; c < nc; ++c) {
- const size_t x = s->tags[c].set;
- if (x == ZERO_TAGS) continue;
- const bool *set = tagpool[x];
+ const tagver_t *set = tagpool[s->tags[c].set];
for (size_t t = 0; t < ntag; ++t) {
- tags[t] |= set[t];
+ const tagver_t v = set[t];
+ if (buf[t] == TAGVER_ZERO) {
+ buf[t] = v;
+ } else if (v != TAGVER_ZERO) {
+ assert(buf[t] == v);
+ }
+ }
+ }
+
+ size_t trail = Tag::NONE;
+ tagver_t trver = TAGVER_ZERO;
+ if (s->rule != Rule::NONE) {
+ trail = dfa.rules[s->rule].trail;
+ if (trail != Tag::NONE) {
+ trver = tagpool[dfa.rules[s->rule].tags][trail];
}
}
- nodes[i].init(tags, s->rule, arcs);
+ nodes[i].init(tagpool.insert(buf), s->rule, trail, trver, arcs);
}
// initialize size of key
const size_t maxlen = maxpath(*this);
- const size_t maxrule = rules.size() + 1; // +1 for none-rule
+ const size_t maxrule = dfa.rules.size() + 1; // +1 for none-rule
const size_t max = std::max(maxlen, maxrule);
if (max <= std::numeric_limits<uint8_t>::max()) {
sizeof_key = 1;
arcs_t arcs;
arcsets_t arcsets;
size_t rule;
- const bool *tags;
+ size_t trail;
+ tagver_t trver;
+ size_t tags;
Node();
- ~Node();
- void init(const bool *ts, size_t r,
+ void init(size_t ts, size_t r, size_t tr, tagver_t tv,
const std::vector<std::pair<size_t, uint32_t> > &arcs);
bool end() const;
Node *nodes;
size_t sizeof_key;
- std::valarray<Rule> &rules;
const size_t defrule;
const std::valarray<Tag> &tags;
+ Tagpool &tagpool;
Skeleton(const dfa_t &dfa, const charset_t &cs, size_t def,
const std::string &dfa_name, const std::string &dfa_cond,
size_t ntags;
explicit eqtag_t(size_t n): ntags(n) {}
- inline bool operator()(const bool *x, const bool *y)
+ inline tagver_t operator()(const tagver_t *x, const tagver_t *y)
{
- return memcmp(x, y, ntags * sizeof(bool)) == 0;
+ return memcmp(x, y, ntags * sizeof(tagver_t)) == 0;
}
};
: type(VAR)
, rule(Rule::NONE)
, name(NULL)
+ , fix()
{}
-void init_var_tag(Tag &tag, size_t r, const std::string *n, size_t o)
+void init_var_tag(Tag &tag, size_t r, const std::string *n)
{
tag.type = Tag::VAR;
tag.rule = r;
tag.name = n;
- tag.var.orig = o;
}
void init_fix_tag(Tag &tag, size_t r, const std::string *n, size_t b, size_t d)
Tagpool::Tagpool(size_t n)
: lookup()
- , buffer(new bool[n * 3])
+ , buffer(new tagver_t[n * 3])
, ntags(n)
, buffer1(&buffer[n * 1])
, buffer2(&buffer[n * 2])
{
// all-zero tag configuration must have static number zero
- std::fill(buffer, buffer + ntags, false);
+ std::fill(buffer, buffer + ntags, TAGVER_ZERO);
assert(ZERO_TAGS == insert(buffer));
}
delete[] buffer;
const size_t n = lookup.size();
for (size_t i = 0; i < n; ++i) {
- free(const_cast<bool*>(lookup[i]));
+ free(const_cast<tagver_t*>(lookup[i]));
}
}
-size_t Tagpool::insert(const bool *tags)
+size_t Tagpool::insert(const tagver_t *tags)
{
- const size_t size = ntags * sizeof(bool);
+ const size_t size = ntags * sizeof(tagver_t);
const uint32_t hash = hash32(0, tags, size);
eqtag_t eq(ntags);
return idx;
}
- bool *copy = static_cast<bool*>(malloc(size));
+ tagver_t *copy = static_cast<tagver_t*>(malloc(size));
memcpy(copy, tags, size);
return lookup.push(hash, copy);
}
-const bool *Tagpool::operator[](size_t idx) const
+const tagver_t *Tagpool::operator[](size_t idx) const
{
return lookup[idx];
}
namespace re2c
{
+typedef int32_t tagver_t;
+
+static const tagver_t TAGVER_ZERO = 0; // absense of tag
+
struct Tag
{
static const size_t NONE;
enum {VAR, FIX} type;
size_t rule;
const std::string *name;
- union
+ struct
{
- struct
- {
- size_t orig;
- } var;
- struct
- {
- size_t base;
- size_t dist;
- } fix;
- };
+ size_t base;
+ size_t dist;
+ } fix;
Tag();
FORBID_COPY(Tag);
};
-void init_var_tag(Tag &tag, size_t r, const std::string *n, size_t o);
+void init_var_tag(Tag &tag, size_t r, const std::string *n);
void init_fix_tag(Tag &tag, size_t r, const std::string *n, size_t b, size_t d);
static const size_t ZERO_TAGS = 0;
struct Tagpool
{
private:
- typedef lookup_t<const bool*> taglookup_t;
+ typedef lookup_t<const tagver_t*> taglookup_t;
taglookup_t lookup;
- bool *buffer;
+ tagver_t *buffer;
public:
const size_t ntags;
- bool *buffer1;
- bool *buffer2;
+ tagver_t *buffer1;
+ tagver_t *buffer2;
explicit Tagpool(size_t n);
~Tagpool();
- size_t insert(const bool *tags);
- const bool *operator[](size_t idx) const;
+ size_t insert(const tagver_t *tags);
+ const tagver_t *operator[](size_t idx) const;
FORBID_COPY(Tagpool);
};
49 -> 50
50 -> 13 [label="[0x00-0x08][0x0A-0x1F][!-0][:-0xFF]"]
50 -> 49 [label="[0x09][ ]"]
-50 -> 57 [label="[1-9]<yyt9>"]
+50 -> 57 [label="[1-9]<yyt1>"]
51 -> 13 [label="[0x00-s][u-0xFF]"]
51 -> 59 [label="[t]"]
52 -> 13 [label="[0x00-q][s-0xFF]"]
165 -> 166
166 [label="scanner_re2c_default.--emit-dot.re:331"]
167 -> 144 [label="[0x00-0x08][0x0A-0x1F][!-9][;-<][>-z][|-0xFF]"]
-167 -> 193 [label="[0x09][ ]<yyt13>"]
-167 -> 195 [label="[:]<yyt13>"]
-167 -> 196 [label="[=]<yyt13>"]
-167 -> 197 [label="[{]<yyt13>"]
+167 -> 193 [label="[0x09][ ]<yyt1>"]
+167 -> 195 [label="[:]<yyt1>"]
+167 -> 196 [label="[=]<yyt1>"]
+167 -> 197 [label="[{]<yyt1>"]
168 -> 169
169 [label="scanner_re2c_default.--emit-dot.re:403"]
170 -> 202
172 [label="scanner_re2c_default.--emit-dot.re:397"]
173 -> 174
174 -> 168 [label="[0x00-0x08][0x0A-0x1F][!-+][--/][:-<][?-@][[-^][`][{-0xFF]"]
-174 -> 170 [label="[0x09][ ]<yyt13>"]
-174 -> 171 [label="[,][=->]<yyt13>"]
+174 -> 170 [label="[0x09][ ]<yyt1>"]
+174 -> 171 [label="[,][=->]<yyt1>"]
174 -> 173 [label="[0-9][A-Z][_][a-z]"]
175 -> 176
176 -> 175 [label="[0x00-0x09][0x0B-[][^-0xFF]"]
229 -> 230
230 -> 144 [label="[0x00-0x08][0x0A-0x1F][!-0][:-0xFF]"]
230 -> 229 [label="[0x09][ ]"]
-230 -> 233 [label="[1-9]<yyt13>"]
+230 -> 233 [label="[1-9]<yyt1>"]
231 -> 144 [label="[0x00-@][[-^][`][{-0xFF]"]
231 -> 226 [label="[A-Z][_][a-z]"]
232 -> 144 [label="[0x00-@][[-^][`][{-0xFF]"]
280 -> 281
281 -> 265 [label="[0x00-0x08][0x0A-0x1F][!-0][:-0xFF]"]
281 -> 280 [label="[0x09][ ]"]
-281 -> 282 [label="[1-9]<yyt2>"]
+281 -> 282 [label="[1-9]<yyt1>"]
282 -> 283
283 -> 265 [label="[0x00-0x08][0x0B-0x0C][0x0E-0x1F][!-/][:-0xFF]"]
283 -> 284 [label="[0x09][ ]"]
314 -> 315
315 -> 303 [label="[0x00-0x08][0x0A-0x1F][!-0][:-0xFF]"]
315 -> 314 [label="[0x09][ ]"]
-315 -> 316 [label="[1-9]<yyt2>"]
+315 -> 316 [label="[1-9]<yyt1>"]
316 -> 317
317 -> 303 [label="[0x00-0x08][0x0B-0x0C][0x0E-0x1F][!-/][:-0xFF]"]
317 -> 318 [label="[0x09][ ]"]
yych = YYPEEK ();
switch (yych) {
case 'b':
- YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
goto yy5;
default: goto yy3;
}
yych = YYPEEK ();
switch (yych) {
case 'b':
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
goto yy9;
default: goto yy8;
}
yy8:
- YYRESTORETAG (yyt1);
+ YYRESTORETAG (yyt2);
{ 1 }
yy9:
YYSKIP ();
}
yy10:
YYSKIP ();
- YYRESTORETAG (yyt0);
+ YYRESTORETAG (yyt1);
{ 0 }
}
{ d }
yy4:
YYSKIP ();
- YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
switch ((yych = YYPEEK ())) {
case 'b': goto yy6;
default: goto yy5;
}
yy5:
- YYRESTORETAG (yyt1);
+ YYRESTORETAG (yyt2);
{ 1 }
yy6:
YYSKIP ();
yych = YYPEEK ();
switch (yych) {
case 'c':
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
goto yy9;
default: goto yy8;
}
default: goto yy13;
}
yy13:
- YYRESTORETAG (yyt0);
+ YYRESTORETAG (yyt1);
{ 0 }
}
{ d }
yy4:
++YYCURSOR;
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
switch ((yych = *YYCURSOR)) {
case 'b': goto yy6;
default: goto yy5;
}
yy5:
- YYCURSOR = yyt1;
+ YYCURSOR = yyt2;
{ 1 }
yy6:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 'c':
- yyt0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy9;
default: goto yy8;
}
default: goto yy13;
}
yy13:
- YYCURSOR = yyt0;
+ YYCURSOR = yyt1;
{ 0 }
}
#define ZZRT(t) s = t
#define ZZCT(t1, t2) t1 = t2
const char *marker, *p0, *p1, *p2, *p3;
- const char *zz_0p0;const char *zz_0p1;const char *zz_0p2;const char *zz_0p3;
+ const char *zz_1;const char *zz_2;const char *zz_3;const char *zz_4;
{
char yych;
case '7':
case '8':
case '9':
- ZZBT (zz_0p0);
+ ZZBT (zz_4);
goto yy4;
default: goto yy2;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p1);
+ ZZBT (zz_3);
goto yy5;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p1);
+ ZZBT (zz_3);
goto yy5;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p2);
+ ZZBT (zz_2);
goto yy10;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p1);
+ ZZBT (zz_3);
goto yy5;
default: goto yy6;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p2);
+ ZZBT (zz_2);
goto yy10;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p3);
+ ZZBT (zz_1);
goto yy14;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p2);
+ ZZBT (zz_2);
goto yy10;
default: goto yy6;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p3);
+ ZZBT (zz_1);
goto yy14;
case '0':
case '1':
default: goto yy17;
}
yy17:
- ZZCT (p3, zz_0p3);
- ZZCT (p2, zz_0p2);
- ZZCT (p1, zz_0p1);
- ZZCT (p0, zz_0p0);
+ ZZCT (p3, zz_1);
+ ZZCT (p2, zz_2);
+ ZZCT (p1, zz_3);
+ ZZCT (p0, zz_4);
{
printf("%u.%u.%u.%u\n",
parse_oct(p0, p1),
yych = YYPEEK ();
switch (yych) {
case '.':
- ZZBT (zz_0p3);
+ ZZBT (zz_1);
goto yy14;
default: goto yy6;
}
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3;
- const char *zz_0p0;const char *zz_0p1;const char *zz_0p2;const char *zz_0p3;
+ const char *zz_1;const char *zz_2;const char *zz_3;const char *zz_4;
{
char yych;
case '7':
case '8':
case '9':
- zz_0p0 = YYCURSOR;
+ zz_4 = YYCURSOR;
goto yy4;
default: goto yy2;
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '.':
- zz_0p1 = YYCURSOR;
+ zz_3 = YYCURSOR;
goto yy5;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p1 = YYCURSOR;
+ zz_3 = YYCURSOR;
goto yy5;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p2 = YYCURSOR;
+ zz_2 = YYCURSOR;
goto yy10;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p1 = YYCURSOR;
+ zz_3 = YYCURSOR;
goto yy5;
default: goto yy6;
}
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p2 = YYCURSOR;
+ zz_2 = YYCURSOR;
goto yy10;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p3 = YYCURSOR;
+ zz_1 = YYCURSOR;
goto yy14;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p2 = YYCURSOR;
+ zz_2 = YYCURSOR;
goto yy10;
default: goto yy6;
}
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p3 = YYCURSOR;
+ zz_1 = YYCURSOR;
goto yy14;
case '0':
case '1':
default: goto yy17;
}
yy17:
- p3 = zz_0p3;
- p2 = zz_0p2;
- p1 = zz_0p1;
- p0 = zz_0p0;
+ p3 = zz_1;
+ p2 = zz_2;
+ p1 = zz_3;
+ p0 = zz_4;
{
printf("%u.%u.%u.%u\n",
parse_oct(p0, p1),
yych = *++YYCURSOR;
switch (yych) {
case '.':
- zz_0p3 = YYCURSOR;
+ zz_1 = YYCURSOR;
goto yy14;
default: goto yy6;
}
char *cur;
char *mar;
char *tok;
- char *yyt1p1;char *yyt1p2;char *yyt1p3;
+ char *yyt1;char *yyt2;char *yyt3;
bool eof;
input_t()
, cur(lim)
, mar(lim)
, tok(lim)
- , yyt1p1(0), yyt1p2(0), yyt1p3(0)
+ , yyt1(0), yyt2(0), yyt3(0)
, eof(false)
{}
bool fill(size_t need)
cur -= free;
mar -= free;
tok -= free;
- yyt1p1 -= free;yyt1p2 -= free;yyt1p3 -= free;
+ yyt1 -= free;yyt2 -= free;yyt3 -= free;
lim += fread(lim, 1, free, stdin);
if (lim < buf + SIZE) {
eof = true;
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p1);
+ YYBACKUPTAG (in.yyt3);
goto yy7;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p1);
+ YYBACKUPTAG (in.yyt3);
goto yy7;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p2);
+ YYBACKUPTAG (in.yyt2);
goto yy12;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p1);
+ YYBACKUPTAG (in.yyt3);
goto yy7;
default: goto yy8;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p2);
+ YYBACKUPTAG (in.yyt2);
goto yy12;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p3);
+ YYBACKUPTAG (in.yyt1);
goto yy16;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p2);
+ YYBACKUPTAG (in.yyt2);
goto yy12;
default: goto yy8;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p3);
+ YYBACKUPTAG (in.yyt1);
goto yy16;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (in.yyt1p3);
+ YYBACKUPTAG (in.yyt1);
goto yy16;
default: goto yy8;
}
yy20:
YYSKIP ();
- YYCOPYTAG (p3, in.yyt1p3);
- YYCOPYTAG (p2, in.yyt1p2);
- YYCOPYTAG (p1, in.yyt1p1);
+ YYCOPYTAG (p3, in.yyt1);
+ YYCOPYTAG (p2, in.yyt2);
+ YYCOPYTAG (p1, in.yyt3);
{
printf("> %u.%u.%u.%u\n",
parse_oct(in.tok, p1),
char *cur;
char *mar;
char *tok;
- char *yyt1p1;char *yyt1p2;char *yyt1p3;
+ char *yyt1;char *yyt2;char *yyt3;
bool eof;
input_t()
, cur(lim)
, mar(lim)
, tok(lim)
- , yyt1p1(0), yyt1p2(0), yyt1p3(0)
+ , yyt1(0), yyt2(0), yyt3(0)
, eof(false)
{}
bool fill(size_t need)
cur -= free;
mar -= free;
tok -= free;
- yyt1p1 -= free;yyt1p2 -= free;yyt1p3 -= free;
+ yyt1 -= free;yyt2 -= free;yyt3 -= free;
lim += fread(lim, 1, free, stdin);
if (lim < buf + SIZE) {
eof = true;
yych = *(in.mar = ++in.cur);
switch (yych) {
case '.':
- in.yyt1p1 = in.cur;
+ in.yyt3 = in.cur;
goto yy7;
case '0':
case '1':
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p1 = in.cur;
+ in.yyt3 = in.cur;
goto yy7;
case '0':
case '1':
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p2 = in.cur;
+ in.yyt2 = in.cur;
goto yy12;
case '0':
case '1':
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p1 = in.cur;
+ in.yyt3 = in.cur;
goto yy7;
default: goto yy8;
}
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p2 = in.cur;
+ in.yyt2 = in.cur;
goto yy12;
case '0':
case '1':
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p3 = in.cur;
+ in.yyt1 = in.cur;
goto yy16;
case '0':
case '1':
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p2 = in.cur;
+ in.yyt2 = in.cur;
goto yy12;
default: goto yy8;
}
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p3 = in.cur;
+ in.yyt1 = in.cur;
goto yy16;
case '0':
case '1':
yych = *++in.cur;
switch (yych) {
case '.':
- in.yyt1p3 = in.cur;
+ in.yyt1 = in.cur;
goto yy16;
default: goto yy8;
}
yy20:
++in.cur;
- p3 = in.yyt1p3;
- p2 = in.yyt1p2;
- p1 = in.yyt1p1;
+ p3 = in.yyt1;
+ p2 = in.yyt2;
+ p1 = in.yyt3;
{
printf("> %u.%u.%u.%u\n",
parse_oct(in.tok, p1),
struct tags_t
{
- const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;
tags_t();
- void push(const char *arg_yyt0p0,const char *arg_yyt0p1,const char *arg_yyt0p2,const char *arg_yyt0p3);
- void pop(const char *&arg_yyt0p0,const char *&arg_yyt0p1,const char *&arg_yyt0p2,const char *&arg_yyt0p3);
+ void push(const char *arg_yyt1,const char *arg_yyt2,const char *arg_yyt3,const char *arg_yyt4);
+ void pop(const char *&arg_yyt1,const char *&arg_yyt2,const char *&arg_yyt3,const char *&arg_yyt4);
};
static void lex(const char *s)
case '7':
case '8':
case '9':
- YYBACKUPTAG (tags.yyt0p0);
+ YYBACKUPTAG (tags.yyt4);
goto yy4;
default: goto yy2;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p1);
+ YYBACKUPTAG (tags.yyt3);
goto yy5;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p1);
+ YYBACKUPTAG (tags.yyt3);
goto yy5;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p2);
+ YYBACKUPTAG (tags.yyt2);
goto yy10;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p1);
+ YYBACKUPTAG (tags.yyt3);
goto yy5;
default: goto yy6;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p2);
+ YYBACKUPTAG (tags.yyt2);
goto yy10;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p3);
+ YYBACKUPTAG (tags.yyt1);
goto yy14;
case '0':
case '1':
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p2);
+ YYBACKUPTAG (tags.yyt2);
goto yy10;
default: goto yy6;
}
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p3);
+ YYBACKUPTAG (tags.yyt1);
goto yy14;
case '0':
case '1':
default: goto yy17;
}
yy17:
- YYCOPYTAG (p3, tags.yyt0p3);
- YYCOPYTAG (p2, tags.yyt0p2);
- YYCOPYTAG (p1, tags.yyt0p1);
- YYCOPYTAG (p0, tags.yyt0p0);
+ YYCOPYTAG (p3, tags.yyt1);
+ YYCOPYTAG (p2, tags.yyt2);
+ YYCOPYTAG (p1, tags.yyt3);
+ YYCOPYTAG (p0, tags.yyt4);
{
printf("%u.%u.%u.%u\n",
parse_oct(p0, p1),
yych = YYPEEK ();
switch (yych) {
case '.':
- YYBACKUPTAG (tags.yyt0p3);
+ YYBACKUPTAG (tags.yyt1);
goto yy14;
default: goto yy6;
}
}
-tags_t::tags_t(): yyt0p0(0),yyt0p1(0),yyt0p2(0),yyt0p3(0) {}
+tags_t::tags_t(): yyt1(0),yyt2(0),yyt3(0),yyt4(0) {}
-void tags_t::push(const char *arg_yyt0p0,const char *arg_yyt0p1,const char *arg_yyt0p2,const char *arg_yyt0p3)
+void tags_t::push(const char *arg_yyt1,const char *arg_yyt2,const char *arg_yyt3,const char *arg_yyt4)
{
- yyt0p0 = arg_yyt0p0;yyt0p1 = arg_yyt0p1;yyt0p2 = arg_yyt0p2;yyt0p3 = arg_yyt0p3;
+ yyt1 = arg_yyt1;yyt2 = arg_yyt2;yyt3 = arg_yyt3;yyt4 = arg_yyt4;
}
-void tags_t::pop(const char *&arg_yyt0p0,const char *&arg_yyt0p1,const char *&arg_yyt0p2,const char *&arg_yyt0p3)
+void tags_t::pop(const char *&arg_yyt1,const char *&arg_yyt2,const char *&arg_yyt3,const char *&arg_yyt4)
{
- arg_yyt0p0 = yyt0p0;arg_yyt0p1 = yyt0p1;arg_yyt0p2 = yyt0p2;arg_yyt0p3 = yyt0p3;
+ arg_yyt1 = yyt1;arg_yyt2 = yyt2;arg_yyt3 = yyt3;arg_yyt4 = yyt4;
}
int main(int argc, char **argv)
struct tags_t
{
- const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;
tags_t();
- void push(const char *arg_yyt0p0,const char *arg_yyt0p1,const char *arg_yyt0p2,const char *arg_yyt0p3);
- void pop(const char *&arg_yyt0p0,const char *&arg_yyt0p1,const char *&arg_yyt0p2,const char *&arg_yyt0p3);
+ void push(const char *arg_yyt1,const char *arg_yyt2,const char *arg_yyt3,const char *arg_yyt4);
+ void pop(const char *&arg_yyt1,const char *&arg_yyt2,const char *&arg_yyt3,const char *&arg_yyt4);
};
static void lex(const char *YYCURSOR)
case '7':
case '8':
case '9':
- tags.yyt0p0 = YYCURSOR;
+ tags.yyt4 = YYCURSOR;
goto yy4;
default: goto yy2;
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '.':
- tags.yyt0p1 = YYCURSOR;
+ tags.yyt3 = YYCURSOR;
goto yy5;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p1 = YYCURSOR;
+ tags.yyt3 = YYCURSOR;
goto yy5;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p2 = YYCURSOR;
+ tags.yyt2 = YYCURSOR;
goto yy10;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p1 = YYCURSOR;
+ tags.yyt3 = YYCURSOR;
goto yy5;
default: goto yy6;
}
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p2 = YYCURSOR;
+ tags.yyt2 = YYCURSOR;
goto yy10;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p3 = YYCURSOR;
+ tags.yyt1 = YYCURSOR;
goto yy14;
case '0':
case '1':
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p2 = YYCURSOR;
+ tags.yyt2 = YYCURSOR;
goto yy10;
default: goto yy6;
}
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p3 = YYCURSOR;
+ tags.yyt1 = YYCURSOR;
goto yy14;
case '0':
case '1':
default: goto yy17;
}
yy17:
- p3 = tags.yyt0p3;
- p2 = tags.yyt0p2;
- p1 = tags.yyt0p1;
- p0 = tags.yyt0p0;
+ p3 = tags.yyt1;
+ p2 = tags.yyt2;
+ p1 = tags.yyt3;
+ p0 = tags.yyt4;
{
printf("%u.%u.%u.%u\n",
parse_oct(p0, p1),
yych = *++YYCURSOR;
switch (yych) {
case '.':
- tags.yyt0p3 = YYCURSOR;
+ tags.yyt1 = YYCURSOR;
goto yy14;
default: goto yy6;
}
}
-tags_t::tags_t(): yyt0p0(0),yyt0p1(0),yyt0p2(0),yyt0p3(0) {}
+tags_t::tags_t(): yyt1(0),yyt2(0),yyt3(0),yyt4(0) {}
-void tags_t::push(const char *arg_yyt0p0,const char *arg_yyt0p1,const char *arg_yyt0p2,const char *arg_yyt0p3)
+void tags_t::push(const char *arg_yyt1,const char *arg_yyt2,const char *arg_yyt3,const char *arg_yyt4)
{
- yyt0p0 = arg_yyt0p0;yyt0p1 = arg_yyt0p1;yyt0p2 = arg_yyt0p2;yyt0p3 = arg_yyt0p3;
+ yyt1 = arg_yyt1;yyt2 = arg_yyt2;yyt3 = arg_yyt3;yyt4 = arg_yyt4;
}
-void tags_t::pop(const char *&arg_yyt0p0,const char *&arg_yyt0p1,const char *&arg_yyt0p2,const char *&arg_yyt0p3)
+void tags_t::pop(const char *&arg_yyt1,const char *&arg_yyt2,const char *&arg_yyt3,const char *&arg_yyt4)
{
- arg_yyt0p0 = yyt0p0;arg_yyt0p1 = yyt0p1;arg_yyt0p2 = yyt0p2;arg_yyt0p3 = yyt0p3;
+ arg_yyt1 = yyt1;arg_yyt2 = yyt2;arg_yyt3 = yyt3;arg_yyt4 = yyt4;
}
int main(int argc, char **argv)
{}
yy4:
++YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
switch ((yych = *YYCURSOR)) {
- case 'b':
- yyt0p = YYCURSOR;
- goto yy6;
- case 'c':
- yyt0 = yyt0p = YYCURSOR;
- goto yy8;
- case 'd':
- yyt0 = yyt0p = YYCURSOR;
- goto yy11;
- default:
- yyt0 = yyt0p = YYCURSOR;
- goto yy5;
+ case 'b': goto yy6;
+ case 'c': goto yy8;
+ case 'd': goto yy11;
+ default: goto yy5;
}
yy5:
- YYCURSOR = yyt0;
- p = yyt0p;
+ YYCURSOR = yyt2;
+ p = yyt1;
{ 1 p }
yy6:
++YYCURSOR;
switch (yych) {
case 'b': goto yy6;
case 'c':
- yyt0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy8;
case 'd':
- yyt0 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy11;
default:
- yyt0 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy5;
}
yy8:
default: goto yy10;
}
yy10:
- YYCURSOR = yyt0;
- p = yyt0p;
+ YYCURSOR = yyt1;
+ p = yyt2;
{ 2 p }
yy11:
++YYCURSOR;
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
case 'b':
- yyt0p = yyt1p = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy19;
case 'c':
- yyt0p = yyt1p = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy21;
default:
- yyt0p = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy18;
}
yy18:
- p = yyt0p;
+ p = yyt2;
{ 1 p }
yy19:
++YYCURSOR;
switch (yych) {
case 'b': goto yy19;
case 'c':
- yyt0p = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy21;
default: goto yy18;
}
default: goto yy23;
}
yy23:
- YYCURSOR = yyt0p;
- p = yyt1p;
+ YYCURSOR = yyt2;
+ p = yyt1;
{ 2 p }
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 'b':
- yyt0p = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy30;
case 'c':
- yyt0p = yyt1 = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy32;
default:
- yyt0p = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy29;
}
yy29:
- p = yyt0p;
+ p = yyt2;
{ 1 p }
yy30:
yyaccept = 1;
YYCURSOR = YYMARKER;
switch (yyaccept) {
case 0:
- yyt0p = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy29;
case 1: goto yy29;
default: goto yy35;
}
yy35:
YYCURSOR = yyt1;
- p = yyt0p;
+ p = yyt2;
{ 2 p }
}
yych = *++YYCURSOR;
switch (yych) {
case 'b':
- yyt0p = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy41;
default: goto yy39;
}
default: goto yy43;
}
yy43:
- p = yyt0p;
+ p = yyt2;
{ 1 p }
yy44:
++YYCURSOR;
}
yy47:
YYCURSOR = yyt1;
- p = yyt0p;
+ p = yyt2;
{ 2 p }
}
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy4;
case 'b': goto yy5;
default: goto yy2;
}
yy5:
++YYCURSOR;
- p = yyt0p;
+ p = yyt1;
{ p }
yy7:
++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy9;
case 'b': goto yy5;
default: goto yy8;
switch (yych) {
case 'a': goto yy14;
case 'b':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy16;
default: goto yy12;
}
{}
yy14:
++YYCURSOR;
- p = yyt0p;
+ p = yyt1;
{ p }
yy16:
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 'a': goto yy14;
case 'b':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy19;
default: goto yy18;
}
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = *YYCURSOR;
- yyt1p = YYCURSOR;
+ yyt1 = YYCURSOR;
switch (yych) {
case 'a': goto yy3;
default: goto yy2;
}
yy2:
- p = yyt1p;
+ p = yyt1;
{ 3 p }
yy3:
yyaccept = 0;
yych = *++YYCURSOR;
switch (yych) {
case 'a':
- yyt1p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy6;
default: goto yy5;
}
default: goto yy7;
}
yy7:
- p = yyt1p;
+ p = yyt1;
{ 2 p }
yy8:
yych = *++YYCURSOR;
default: goto yy2;
}
yy2:
- p = yyt0p;
+ p = yyt1;
{ p }
yy3:
++YYCURSOR;
if (yyaccept == 0) {
goto yy2;
} else {
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy2;
}
yy5:
switch (yych) {
case 'a': goto yy3;
default:
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy2;
}
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 'b':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
default: goto yy3;
}
if (yyaccept == 0) {
goto yy3;
} else {
- yyt0p = yyt0p_;
+ yyt1 = yyt1_;
goto yy8;
}
yy7:
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt0p_ = yyt0p;
+ yyt1_ = yyt1;
goto yy9;
default: goto yy8;
}
yy8:
- p = yyt0p;
+ p = yyt1;
{ p }
yy9:
++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case 'b':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
default: goto yy6;
}
#define YYRESTORETAG(t) s = t
#define YYCOPYTAG(t1, t2) t1 = t2
const char *marker, *p0, *p1, *p2, *p3;
- const char *yyt0;const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;const char *yyt5;
{
char yych;
yych = YYPEEK ();
switch (yych) {
case '0':
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt5);
goto yy4;
default: goto yy2;
}
yych = YYPEEK ();
switch (yych) {
case '1':
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt4);
goto yy5;
default: goto yy3;
}
yych = YYPEEK ();
switch (yych) {
case '2':
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt3);
goto yy8;
default: goto yy6;
}
yych = YYPEEK ();
switch (yych) {
case '3':
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt2);
goto yy11;
default: goto yy6;
}
yych = YYPEEK ();
switch (yych) {
case '4':
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
goto yy15;
default: goto yy6;
}
}
yy19:
YYSKIP ();
- YYRESTORETAG (yyt0);
- YYCOPYTAG (p3, yyt0p3);
- YYCOPYTAG (p2, yyt0p2);
- YYCOPYTAG (p1, yyt0p1);
- YYCOPYTAG (p0, yyt0p0);
+ YYRESTORETAG (yyt1);
+ YYCOPYTAG (p3, yyt2);
+ YYCOPYTAG (p2, yyt3);
+ YYCOPYTAG (p1, yyt4);
+ YYCOPYTAG (p0, yyt5);
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3, *p4;
- const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;const char *yyt0p4;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;const char *yyt5;
{
char yych;
yych = *YYCURSOR;
switch (yych) {
case '0':
- yyt0p0 = YYCURSOR;
+ yyt5 = YYCURSOR;
goto yy5;
case '1':
- yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt4 = yyt5 = YYCURSOR;
goto yy7;
case '2':
- yyt0p2 = yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt3 = yyt4 = yyt5 = YYCURSOR;
goto yy9;
case '3':
- yyt0p3 = yyt0p2 = yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt2 = yyt3 = yyt4 = yyt5 = YYCURSOR;
goto yy11;
case '4':
- yyt0p4 = yyt0p3 = yyt0p2 = yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = yyt4 = yyt5 = YYCURSOR;
goto yy13;
default: goto yy3;
}
yy2:
- p4 = yyt0p4;
- p3 = yyt0p3;
- p2 = yyt0p2;
- p1 = yyt0p1;
- p0 = yyt0p0;
+ p4 = yyt1;
+ p3 = yyt2;
+ p2 = yyt3;
+ p1 = yyt4;
+ p0 = yyt5;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%.*s'\n",
p1 - p0, p0,
switch (yych) {
case '0': goto yy5;
case '1':
- yyt0p1 = YYCURSOR;
+ yyt4 = YYCURSOR;
goto yy7;
case '2':
- yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt3 = yyt4 = YYCURSOR;
goto yy9;
case '3':
- yyt0p3 = yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt2 = yyt3 = yyt4 = YYCURSOR;
goto yy11;
case '4':
- yyt0p4 = yyt0p3 = yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = yyt4 = YYCURSOR;
goto yy13;
default:
- yyt0p4 = yyt0p3 = yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = yyt4 = YYCURSOR;
goto yy2;
}
yy7:
switch (yych) {
case '1': goto yy7;
case '2':
- yyt0p2 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy9;
case '3':
- yyt0p3 = yyt0p2 = YYCURSOR;
+ yyt2 = yyt3 = YYCURSOR;
goto yy11;
case '4':
- yyt0p4 = yyt0p3 = yyt0p2 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = YYCURSOR;
goto yy13;
default:
- yyt0p4 = yyt0p3 = yyt0p2 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = YYCURSOR;
goto yy2;
}
yy9:
switch (yych) {
case '2': goto yy9;
case '3':
- yyt0p3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy11;
case '4':
- yyt0p4 = yyt0p3 = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy13;
default:
- yyt0p4 = yyt0p3 = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy2;
}
yy11:
switch (yych) {
case '3': goto yy11;
case '4':
- yyt0p4 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy13;
default:
- yyt0p4 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy2;
}
yy13:
#define YYRESTORETAG(t) s = t
#define YYCOPYTAG(t1, t2) t1 = t2
const char *marker, *p0, *p1, *p2, *p3;
- const char *yyt0;const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;const char *yyt5;
{
char yych;
yych = YYPEEK ();
switch (yych) {
case '0':
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt5);
goto yy5;
case '1':
- YYBACKUPTAG (yyt0p1);
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt4);
+ YYBACKUPTAG (yyt5);
goto yy7;
case '2':
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
+ YYBACKUPTAG (yyt5);
goto yy9;
case '3':
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
+ YYBACKUPTAG (yyt5);
goto yy11;
case '4':
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
+ YYBACKUPTAG (yyt5);
goto yy13;
default: goto yy3;
}
yy2:
- YYRESTORETAG (yyt0);
- YYCOPYTAG (p3, yyt0p3);
- YYCOPYTAG (p2, yyt0p2);
- YYCOPYTAG (p1, yyt0p1);
- YYCOPYTAG (p0, yyt0p0);
+ YYRESTORETAG (yyt1);
+ YYCOPYTAG (p3, yyt2);
+ YYCOPYTAG (p2, yyt3);
+ YYCOPYTAG (p1, yyt4);
+ YYCOPYTAG (p0, yyt5);
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
switch (yych) {
case '0': goto yy5;
case '1':
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt4);
goto yy7;
case '2':
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
goto yy9;
case '3':
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
goto yy11;
case '4':
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
goto yy13;
default:
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
goto yy2;
}
yy7:
switch (yych) {
case '1': goto yy7;
case '2':
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt3);
goto yy9;
case '3':
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
goto yy11;
case '4':
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
goto yy13;
default:
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
goto yy2;
}
yy9:
switch (yych) {
case '2': goto yy9;
case '3':
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt2);
goto yy11;
case '4':
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
goto yy13;
default:
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
goto yy2;
}
yy11:
switch (yych) {
case '3': goto yy11;
case '4':
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
goto yy13;
default:
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
goto yy2;
}
yy13:
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3;
- const char *yyt0;const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;const char *yyt5;
{
char yych;
yych = *YYCURSOR;
switch (yych) {
case '0':
- yyt0p0 = YYCURSOR;
+ yyt5 = YYCURSOR;
goto yy5;
case '1':
- yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt4 = yyt5 = YYCURSOR;
goto yy7;
case '2':
- yyt0p2 = yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt3 = yyt4 = yyt5 = YYCURSOR;
goto yy9;
case '3':
- yyt0p3 = yyt0p2 = yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt2 = yyt3 = yyt4 = yyt5 = YYCURSOR;
goto yy11;
case '4':
- yyt0 = yyt0p3 = yyt0p2 = yyt0p1 = yyt0p0 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = yyt4 = yyt5 = YYCURSOR;
goto yy13;
default: goto yy3;
}
yy2:
- YYCURSOR = yyt0;
- p3 = yyt0p3;
- p2 = yyt0p2;
- p1 = yyt0p1;
- p0 = yyt0p0;
+ YYCURSOR = yyt1;
+ p3 = yyt2;
+ p2 = yyt3;
+ p1 = yyt4;
+ p0 = yyt5;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
switch (yych) {
case '0': goto yy5;
case '1':
- yyt0p1 = YYCURSOR;
+ yyt4 = YYCURSOR;
goto yy7;
case '2':
- yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt3 = yyt4 = YYCURSOR;
goto yy9;
case '3':
- yyt0p3 = yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt2 = yyt3 = yyt4 = YYCURSOR;
goto yy11;
case '4':
- yyt0 = yyt0p3 = yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = yyt4 = YYCURSOR;
goto yy13;
default:
- yyt0 = yyt0p3 = yyt0p2 = yyt0p1 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = yyt4 = YYCURSOR;
goto yy2;
}
yy7:
switch (yych) {
case '1': goto yy7;
case '2':
- yyt0p2 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy9;
case '3':
- yyt0p3 = yyt0p2 = YYCURSOR;
+ yyt2 = yyt3 = YYCURSOR;
goto yy11;
case '4':
- yyt0 = yyt0p3 = yyt0p2 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = YYCURSOR;
goto yy13;
default:
- yyt0 = yyt0p3 = yyt0p2 = YYCURSOR;
+ yyt1 = yyt2 = yyt3 = YYCURSOR;
goto yy2;
}
yy9:
switch (yych) {
case '2': goto yy9;
case '3':
- yyt0p3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy11;
case '4':
- yyt0 = yyt0p3 = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy13;
default:
- yyt0 = yyt0p3 = YYCURSOR;
+ yyt1 = yyt2 = YYCURSOR;
goto yy2;
}
yy11:
switch (yych) {
case '3': goto yy11;
case '4':
- yyt0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy13;
default:
- yyt0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy2;
}
yy13:
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3, *p4;
- const char *yyt0p1;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;
{
char yych;
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '1':
- yyt0p1 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
case '2':
- yyt0p1 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy8;
default: goto yy3;
}
yych = *++YYCURSOR;
switch (yych) {
case '3':
- yyt0p3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy9;
case '4':
- yyt0p3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy11;
default: goto yy7;
}
yy11:
++YYCURSOR;
p4 = YYCURSOR - 1;
- p3 = yyt0p3;
- p2 = yyt0p3 - 1;
- p1 = yyt0p1;
- p0 = yyt0p1 - 1;
+ p3 = yyt2;
+ p2 = yyt2 - 1;
+ p1 = yyt1;
+ p0 = yyt1 - 1;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%.*s'\n",
p1 - p0, p0,
#define YYRESTORETAG(t) s = t
#define YYCOPYTAG(t1, t2) t1 = t2
const char *marker, *p0, *p1, *p2, *p3;
- const char *yyt0;const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;const char *yyt5;
{
char yych;
yych = YYPEEK ();
switch (yych) {
case '0':
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt5);
goto yy4;
default: goto yy2;
}
yych = YYPEEK ();
switch (yych) {
case '1':
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt4);
goto yy5;
case '2':
- YYBACKUPTAG (yyt0p2);
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt3);
+ YYBACKUPTAG (yyt4);
goto yy8;
default: goto yy3;
}
switch (yych) {
case '1': goto yy5;
case '2':
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt3);
goto yy8;
default: goto yy7;
}
yych = YYPEEK ();
switch (yych) {
case '3':
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt2);
goto yy9;
case '4':
- YYBACKUPTAG (yyt0);
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt1);
+ YYBACKUPTAG (yyt2);
goto yy11;
default: goto yy7;
}
switch (yych) {
case '3': goto yy9;
case '4':
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
goto yy11;
default: goto yy7;
}
yy11:
YYSKIP ();
- YYRESTORETAG (yyt0);
- YYCOPYTAG (p3, yyt0p3);
- YYCOPYTAG (p2, yyt0p2);
- YYCOPYTAG (p1, yyt0p1);
- YYCOPYTAG (p0, yyt0p0);
+ YYRESTORETAG (yyt1);
+ YYCOPYTAG (p3, yyt2);
+ YYCOPYTAG (p2, yyt3);
+ YYCOPYTAG (p1, yyt4);
+ YYCOPYTAG (p0, yyt5);
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3;
- const char *yyt0p1;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;
{
char yych;
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '1':
- yyt0p1 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
case '2':
- yyt0p1 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy8;
default: goto yy3;
}
yych = *++YYCURSOR;
switch (yych) {
case '3':
- yyt0p3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy9;
case '4':
- yyt0p3 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy11;
default: goto yy7;
}
yy11:
++YYCURSOR;
YYCURSOR -= 1;
- p3 = yyt0p3;
- p2 = yyt0p3 - 1;
- p1 = yyt0p1;
- p0 = yyt0p1 - 1;
+ p3 = yyt2;
+ p2 = yyt2 - 1;
+ p1 = yyt1;
+ p0 = yyt1 - 1;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3, *p4;
- const char *yyt0p0;const char *yyt0p2;const char *yyt0p4;
+ const char *yyt1;const char *yyt2;const char *yyt3;
{
char yych;
yych = *YYCURSOR;
switch (yych) {
case '0':
- yyt0p0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy4;
case '1':
- yyt0p0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
default: goto yy2;
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '2':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy10;
case '3':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy12;
default: goto yy3;
}
yych = *++YYCURSOR;
switch (yych) {
case '2':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy10;
case '3':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy12;
default: goto yy8;
}
}
yy12:
++YYCURSOR;
- yyt0p4 = YYCURSOR;
+ yyt3 = YYCURSOR;
yych = *YYCURSOR;
goto yy15;
yy13:
- p4 = yyt0p4;
- p3 = yyt0p4 - 1;
- p2 = yyt0p2;
- p1 = yyt0p2 - 1;
- p0 = yyt0p0;
+ p4 = yyt3;
+ p3 = yyt3 - 1;
+ p2 = yyt2;
+ p1 = yyt2 - 1;
+ p0 = yyt1;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%.*s'\n",
p1 - p0, p0,
#define YYRESTORETAG(t) s = t
#define YYCOPYTAG(t1, t2) t1 = t2
const char *marker, *p0, *p1, *p2, *p3;
- const char *yyt0;const char *yyt0p0;const char *yyt0p1;const char *yyt0p2;const char *yyt0p3;
+ const char *yyt1;const char *yyt2;const char *yyt3;const char *yyt4;const char *yyt5;
{
char yych;
yych = YYPEEK ();
switch (yych) {
case '0':
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt5);
goto yy4;
case '1':
- YYBACKUPTAG (yyt0p1);
- YYBACKUPTAG (yyt0p0);
+ YYBACKUPTAG (yyt4);
+ YYBACKUPTAG (yyt5);
goto yy5;
default: goto yy2;
}
yych = YYPEEK ();
switch (yych) {
case '2':
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt3);
goto yy10;
case '3':
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
goto yy12;
default: goto yy3;
}
switch (yych) {
case '0': goto yy6;
case '1':
- YYBACKUPTAG (yyt0p1);
+ YYBACKUPTAG (yyt4);
goto yy9;
default: goto yy8;
}
yych = YYPEEK ();
switch (yych) {
case '2':
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt3);
goto yy10;
case '3':
- YYBACKUPTAG (yyt0p3);
- YYBACKUPTAG (yyt0p2);
+ YYBACKUPTAG (yyt2);
+ YYBACKUPTAG (yyt3);
goto yy12;
default: goto yy8;
}
switch (yych) {
case '2': goto yy10;
case '3':
- YYBACKUPTAG (yyt0p3);
+ YYBACKUPTAG (yyt2);
goto yy12;
default: goto yy8;
}
yy12:
YYSKIP ();
- YYBACKUPTAG (yyt0);
+ YYBACKUPTAG (yyt1);
yych = YYPEEK ();
goto yy15;
yy13:
- YYRESTORETAG (yyt0);
- YYCOPYTAG (p3, yyt0p3);
- YYCOPYTAG (p2, yyt0p2);
- YYCOPYTAG (p1, yyt0p1);
- YYCOPYTAG (p0, yyt0p0);
+ YYRESTORETAG (yyt1);
+ YYCOPYTAG (p3, yyt2);
+ YYCOPYTAG (p2, yyt3);
+ YYCOPYTAG (p1, yyt4);
+ YYCOPYTAG (p0, yyt5);
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
static void lex(const char *YYCURSOR)
{
const char *YYMARKER, *p0, *p1, *p2, *p3;
- const char *yyt0;const char *yyt0p0;const char *yyt0p2;
+ const char *yyt1;const char *yyt2;const char *yyt3;
{
char yych;
yych = *YYCURSOR;
switch (yych) {
case '0':
- yyt0p0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy4;
case '1':
- yyt0p0 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
default: goto yy2;
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '2':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy10;
case '3':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy12;
default: goto yy3;
}
yych = *++YYCURSOR;
switch (yych) {
case '2':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy10;
case '3':
- yyt0p2 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy12;
default: goto yy8;
}
}
yy12:
++YYCURSOR;
- yyt0 = YYCURSOR;
+ yyt3 = YYCURSOR;
yych = *YYCURSOR;
goto yy15;
yy13:
- YYCURSOR = yyt0;
- p3 = yyt0 - 1;
- p2 = yyt0p2;
- p1 = yyt0p2 - 1;
- p0 = yyt0p0;
+ YYCURSOR = yyt3;
+ p3 = yyt3 - 1;
+ p2 = yyt2;
+ p1 = yyt2 - 1;
+ p0 = yyt1;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy4;
default: goto yy2;
}
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy4;
default: goto yy6;
}
yy6:
- p = yyt0p;
+ p = yyt1;
{ p }
}
yych = *++YYCURSOR;
switch (yych) {
case 'a':
- yyt0p = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy13;
default: goto yy10;
}
}
yy13:
++YYCURSOR;
- p = yyt0p;
+ p = yyt1;
{ p }
}