1. use u32 to hold the state during runtime to prevent repeated zero extension
2. have a tight small loop for processing characters which breaks when
something interesting happens
Make nfaCheckFinalState return MO_HALT_MATCHING when the user instructs
us (via the callback return value) to halt matching. In the caller,
check this value and stop matching if told.