commit - 13efde33b7b447d7c224632ab895efd18662dc9e
commit + d6b8218a2b8ddb3ccec75f7eda1298d0309be0a7
blob - 0ac282cf73284d376a6eff871018ae760d015458
blob + 2326eccbc587fc907ccbb28b94c613242803e6fc
--- nfa.c
+++ nfa.c
pr->out = out;
pr->env = env;
pr->pos = 0;
- pr->match = -1; /* no match */
+ pr->match = -1; /* no match (yet) */
pr->active = 1;
memset(pr->act.bits, 0, pr->act.sz * sizeof(bunch_t));
* run the automaton for one iteration, either consuming input, generating
* output or failing.
*
- * returns the number of input characters consumed or -1 if stuck.
+ * returns the number (0 or 1) of input symbols consumed or -1 if stuck.
*/
static int
nfastep(struct prep *pr, int x, struct set *act, struct set *next)
}
int
-nfarun_(struct prep *pr,
- sub_t *sub, out_t *out, void *env, const char *inp, size_t sz)
+nfarun_(struct prep *pr, sub_t *sub, out_t *out, void *env,
+ const char *inp, size_t sz)
{
nfastart(pr, sub, out, env);
nfacont(pr, inp, sz);