extract-word: Do not re-evaluate the state on each parsed character
authorFilipe Brandenburger <filbranden@google.com>
Fri, 6 Nov 2015 05:51:24 +0000 (21:51 -0800)
committerFilipe Brandenburger <filbranden@google.com>
Fri, 6 Nov 2015 05:51:24 +0000 (21:51 -0800)
commit27fc921b658adc5baa988c4c213888b016a60b18
tree426b33d9cad99e3f33104b5a5e1d6bffaf3ef446
parent93de9eb76d628cf731120d97332e03600c167271
extract-word: Do not re-evaluate the state on each parsed character

Use inner loops to keep processing the same state, except when there is
a state change, then break back to the outer loop so that the correct
branch can be selected again.

Tested that no regressions were introduced in test-extract-word.
src/basic/extract-word.c