char nfaExecGough8_reportCurrent(const struct NFA *n, struct mq *q) {
const struct mcclellan *m = (const struct mcclellan *)getImplNfa(n);
NfaCallback cb = q->cb;
- void *ctxt = q->context;
u8 s = *(u8 *)q->state;
u64a offset = q_cur_offset(q);
const struct gough_som_info *som = getSomInfo(q->state);
assert(s);
if (s >= m->accept_limit_8) {
+ void *ctxt = q->context;
u32 cached_accept_id = 0;
u16 cached_accept_state = 0;
u32 cached_accept_som = 0;
char nfaExecGough16_reportCurrent(const struct NFA *n, struct mq *q) {
const struct mcclellan *m = (const struct mcclellan *)getImplNfa(n);
NfaCallback cb = q->cb;
- void *ctxt = q->context;
u16 s = *(u16 *)q->state;
const struct mstate_aux *aux = get_aux(m, s);
u64a offset = q_cur_offset(q);
assert(s);
if (aux->accept) {
+ void *ctxt = q->context;
u32 cached_accept_id = 0;
u16 cached_accept_state = 0;
u32 cached_accept_som = 0;
for (size_t j = 0; j < width; j++) {
dstate_id_t curr_id = state_chain[j];
- dstate_id_t next_id = state_chain[j + 1];
// The last state of the chain doesn't belong to a wide state.
info.extra[curr_id].wideState = true;
if (j == width - 1) {
symbol_chain.emplace_back(chain_tail[i]);
} else {
+ dstate_id_t next_id = state_chain[j + 1];
for (symbol_t sym = 0; sym < info.impl_alpha_size; sym++) {
if (rdfa.states[curr_id].next[sym] == next_id) {
symbol_chain.emplace_back(sym);
char nfaExecSheng_reportCurrent(const struct NFA *n, struct mq *q) {
const struct sheng *sh = (const struct sheng *)getImplNfa(n);
NfaCallback cb = q->cb;
- void *ctxt = q->context;
u8 s = *(u8 *)q->state;
const struct sstate_aux *aux = get_aux(sh, s);
u64a offset = q_cur_offset(q);
assert(q_cur_type(q) == MQE_START);
if (aux->accept) {
+ void *ctxt = q->context;
if (sh->flags & SHENG_FLAG_SINGLE_REPORT) {
fireSingleReport(cb, ctxt, sh->report, offset);
} else {
none_of(begin(lits), end(lits), mixed_sensitivity));
// Build the HWLM literal mask.
- vector<u8> msk, lcmp;
+ vector<u8> msk;
if (grey.roseHamsterMasks) {
+ vector<u8> lcmp;
buildLiteralMask(mask, msk, lcmp, delay);
}
// We may have already built this NFA.
if (contains(suffixes, s)) {
- u32 id = suffixes[s];
if (!tbi.isInETable(v)) {
+ u32 id = suffixes[s];
vertex_map[id].emplace_back(v);
}
continue;
for (const auto &e : bc.suffixes) {
const suffix_id &s = e.first;
- u32 qi = e.second;
set<u32> ekeys = reportsToEkeys(all_reports(s), build.rm);
if (!ekeys.empty()) {
+ u32 qi = e.second;
qi_to_ekeys[qi] = {ekeys.begin(), ekeys.end()};
}
}
const auto &cfrag = fragments[pfrag.included_frag_id];
/** assert(pfrag.s.length() >= cfrag.s.length() && **/
assert(pfrag.s.length() == cfrag.s.length() &&
- !pfrag.s.any_nocase() >= !cfrag.s.any_nocase());
+ !pfrag.s.any_nocase() != !cfrag.s.any_nocase());
u32 child_offset = cfrag.delay_program_offset;
DEBUG_PRINTF("child %u offset %u\n", cfrag.fragment_id,
child_offset);