summaryrefslogtreecommitdiffstats
path: root/generic/regc_nfa.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-06 18:00:21 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-06 18:00:21 (GMT)
commit24abdb72019b174cb20e0d4d29e0a76b689c4459 (patch)
tree2f483ad08f30a9acbbb404016c2a8cbb03085327 /generic/regc_nfa.c
parent37745421ae8d82481007aca3632c76c589a1ff63 (diff)
downloadtcl-24abdb72019b174cb20e0d4d29e0a76b689c4459.zip
tcl-24abdb72019b174cb20e0d4d29e0a76b689c4459.tar.gz
tcl-24abdb72019b174cb20e0d4d29e0a76b689c4459.tar.bz2
Indent reduction in fixempties().
Diffstat (limited to 'generic/regc_nfa.c')
-rw-r--r--generic/regc_nfa.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c
index 6e32cc9..b125062 100644
--- a/generic/regc_nfa.c
+++ b/generic/regc_nfa.c
@@ -1208,15 +1208,15 @@ FILE *f; /* for debug output; NULL none */
*/
for (s = nfa->states; s != NULL && !NISERR(); s = nexts) {
nexts = s->next;
- if (s->nouts == 1 && !s->flag) {
- a = s->outs;
- assert(a != NULL && a->outchain == NULL);
- if (a->type == EMPTY) {
- if (s != a->to)
- moveins(nfa, s, a->to);
- dropstate(nfa, s);
- }
- }
+ if (s->flag || s->nouts != 1)
+ continue;
+ a = s->outs;
+ assert(a != NULL && a->outchain == NULL);
+ if (a->type != EMPTY)
+ continue;
+ if (s != a->to)
+ moveins(nfa, s, a->to);
+ dropstate(nfa, s);
}
/*
@@ -1226,16 +1226,16 @@ FILE *f; /* for debug output; NULL none */
for (s = nfa->states; s != NULL && !NISERR(); s = nexts) {
nexts = s->next;
/* while we're at it, ensure tmp fields are clear for next step */
- s->tmp = NULL;
- if (s->nins == 1 && !s->flag) {
- a = s->ins;
- assert(a != NULL && a->inchain == NULL);
- if (a->type == EMPTY) {
- if (s != a->from)
- moveouts(nfa, s, a->from);
- dropstate(nfa, s);
- }
- }
+ assert(s->tmp = NULL);
+ if (s->flag || s->nins != 1)
+ continue;
+ a = s->ins;
+ assert(a != NULL && a->inchain == NULL);
+ if (a->type != EMPTY)
+ continue;
+ if (s != a->from)
+ moveouts(nfa, s, a->from);
+ dropstate(nfa, s);
}
/*