diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/dfa.c | 5 |
2 files changed, 6 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2017-01-10 Paul Eggert <eggert@cs.ucla.edu> + + dfa: minor simplification with emptyset + * lib/dfa.c (build_state): Simplify by using emptyset. + 2017-01-09 Paul Eggert <eggert@cs.ucla.edu> dfa: shrink constraints from 4 bits to 3 @@ -2760,10 +2760,7 @@ build_state (state_num s, struct dfa *d, unsigned char uc) matches.w[j] &= d->syntax.letters.w[j] | d->syntax.newline.w[j]; /* If there are no characters left, there's no point in going on. */ - size_t j; - for (j = 0; j < CHARCLASS_WORDS && !matches.w[j]; j++) - continue; - if (j == CHARCLASS_WORDS) + if (emptyset (&matches)) continue; /* If we have reset the bit that made us declare "matched", reset |