// root state can be non-core, so we pass zero as origin to avoid checks
const conf_t c0(ctx.nfa.root, 0, HROOT);
ctx.reach.push_back(c0);
- closure_leftmost_dfs(ctx);
for (;;) {
+ closure_leftmost_dfs(ctx);
const uint32_t sym = static_cast<uint8_t>(*ctx.cursor++);
if (ctx.state.empty() || sym == 0) break;
reach_on_symbol(ctx, sym);
- closure_leftmost_dfs(ctx);
}
for (cconfiter_t i = ctx.state.begin(), e = ctx.state.end(); i != e; ++i) {
const conf_t c0(ctx.nfa.root, 0/* unused */, HROOT);
ctx.reach.push_back(c0);
- closure_leftmost_dfs(ctx);
for (;;) {
+ closure_leftmost_dfs(ctx);
const uint32_t sym = static_cast<uint8_t>(*ctx.cursor++);
if (ctx.state.empty() || sym == 0) break;
make_step(ctx, sym);
- closure_leftmost_dfs(ctx);
}
make_final_step(ctx);
// root state can be non-core, so we pass zero as origin to avoid checks
const conf_t c0(ctx.nfa.root, 0, HROOT);
ctx.reach.push_back(c0);
- closure_posix(ctx);
for (;;) {
+ closure_posix(ctx);
const uint32_t sym = static_cast<uint8_t>(*ctx.cursor++);
if (ctx.state.empty() || sym == 0) break;
make_one_step(ctx, sym);
- closure_posix(ctx);
}
make_final_step(ctx);
// 1st pass, forward: find longest match on a simple NFA
ctx.reach.push_back(conf_t(ctx.nfa0->root, 0, 0));
- closure_simple(ctx);
for (;;) {
+ closure_simple(ctx);
const uint32_t sym = static_cast<uint8_t>(*ctx.cursor++);
if (ctx.state.empty() || sym == 0) break;
make_one_step_simple(ctx, sym);
- closure_simple(ctx);
}
for (cconfiter_t i = ctx.state.begin(), e = ctx.state.end(); i != e; ++i) {
std::fill(offsets5, offsets5 + sz, -2);
ctx.reach.push_back(conf_t(ctx.nfa.root, 0, 0));
- closure_posix(ctx);
for (;;) {
+ closure_posix(ctx);
if (ctx.state.empty() || ctx.cursor == string) break;
const uint32_t sym = static_cast<uint8_t>(*--ctx.cursor);
make_one_step(ctx, sym);
--ctx.step;
- closure_posix(ctx);
}
make_final_step(ctx);
// root state can be non-core, so we pass zero as origin to avoid checks
const conf_t c0(ctx.nfa.root, 0, HROOT);
ctx.reach.push_back(c0);
- closure_posix(ctx);
for (;;) {
+ closure_posix(ctx);
const uint32_t sym = static_cast<uint8_t>(*ctx.cursor++);
if (ctx.state.empty() || sym == 0) break;
make_one_step(ctx, sym);
- closure_posix(ctx);
}
make_final_step(ctx);
const conf_t c0(ctx.nfa.root, 0, HROOT);
ctx.reach.push_back(c0);
- closure_posix_gtop(ctx);
for (;;) {
+ closure_posix_gtop(ctx);
const uint32_t sym = static_cast<uint8_t>(*ctx.cursor++);
if (ctx.state.empty() || sym == 0) break;
make_step(ctx, sym);
- closure_posix_gtop(ctx);
}
make_final_step(ctx);