void reach_on_symbol(ctx_t &ctx, uint32_t sym)
{
    ctx.dc_symbol = sym;
    const uint32_t symbol = ctx.dfa.charset[sym];

    const kernel_t *kernel = ctx.dc_kernels[ctx.dc_origin];
    ctx.oldprectbl = kernel->prectbl;
    ctx.oldprecdim = kernel->size;

    closure_t &reach = ctx.reach;
    reach.clear();

    // Add configurations in reverse order: leftmost greedy closure uses
    // the resulting array as stack, and POSIX closure doesn't care (GOR1
    // pre-sorts configurations, and GTOP uses priority queue).
    for (uint32_t i = static_cast<uint32_t>(kernel->size); i --> 0; ) {
        nfa_state_t *s = transition(kernel->state[i], symbol);
        if (s) {
            const uint32_t v = ctx.dc_opts->stadfa ? 0 : kernel->tvers[i];
            const clos_t c(s, i, v, kernel->thist[i], HROOT);
            reach.push_back(c);
        }
    }
}
void reach_on_symbol(ctx_t &ctx, uint32_t sym)
{
    ctx.dc_symbol = sym;
    const uint32_t symbol = ctx.dfa.charset[sym];

    const kernel_t *kernel = ctx.dc_kernels[ctx.dc_origin];
    ctx.oldprectbl = kernel->prectbl;
    ctx.oldprecdim = kernel->size;

    closure_t &reach = ctx.reach;
    reach.clear();

     
     
     
    for (uint32_t i = static_cast<uint32_t>(kernel->size); i --> 0; ) {
        nfa_state_t *s = transition(kernel->state[i], symbol);
        if (s) {
            const uint32_t v = ctx.dc_opts->stadfa ? 0 : kernel->tvers[i];
            const clos_t c(s, i, v, kernel->thist[i], HROOT);
            reach.push_back(c);
        }
    }
}