This is first step to postpone labelling states until all the
code is actually generated (in the form of some structure in
memory) and it's time to pretty-print it to file.
Labels shouldn't be mixed up with states (in particular, they
shouldn't be used as a state identifier).
}
if (n == 1)
{
- if (next == NULL || s[0].to->label != next->label)
+ if (next == NULL || s[0].to != next)
{
branches.push_back (std::make_pair (static_cast<const Cond *> (NULL), s[0].to));
}
void DFA::addState(State **a, State *s)
{
- s->label = nStates++;
+ ++nStates;
s->next = *a;
*a = s;