mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 09:21:52 +03:00
Fix variableScope
This commit is contained in:
@@ -978,7 +978,6 @@ char nfaExecGough16_initCompressedState(const struct NFA *nfa, u64a offset,
|
||||
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);
|
||||
@@ -986,6 +985,7 @@ char nfaExecGough8_reportCurrent(const struct NFA *n, struct mq *q) {
|
||||
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;
|
||||
@@ -1000,7 +1000,6 @@ char nfaExecGough8_reportCurrent(const struct NFA *n, struct mq *q) {
|
||||
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);
|
||||
@@ -1010,6 +1009,7 @@ char nfaExecGough16_reportCurrent(const struct NFA *n, struct mq *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;
|
||||
|
||||
@@ -1379,7 +1379,6 @@ void generate_symbol_chain(dfa_info &info, vector<symbol_t> &chain_tail) {
|
||||
|
||||
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;
|
||||
@@ -1388,6 +1387,7 @@ void generate_symbol_chain(dfa_info &info, vector<symbol_t> &chain_tail) {
|
||||
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);
|
||||
|
||||
@@ -814,7 +814,6 @@ char nfaExecSheng_testEOD(const struct NFA *nfa, const char *state,
|
||||
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);
|
||||
@@ -823,6 +822,7 @@ char nfaExecSheng_reportCurrent(const struct NFA *n, struct mq *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 {
|
||||
|
||||
Reference in New Issue
Block a user