mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
mcclellan: fix dump issue in wide-state case.
This commit is contained in:
parent
f68723a606
commit
b5a8644b1f
@ -275,7 +275,8 @@ void nfaExecMcClellan16_dumpDot(const NFA *nfa, FILE *f) {
|
|||||||
|
|
||||||
dumpDotPreambleDfa(f);
|
dumpDotPreambleDfa(f);
|
||||||
|
|
||||||
for (u16 i = 1; i < m->state_count; i++) {
|
u16 sherman_ceil = m->has_wide == 1 ? m->wide_limit : m->state_count;
|
||||||
|
for (u16 i = 1; i < sherman_ceil; i++) {
|
||||||
describeNode(nfa, m, i, f);
|
describeNode(nfa, m, i, f);
|
||||||
|
|
||||||
u16 t[ALPHABET_SIZE];
|
u16 t[ALPHABET_SIZE];
|
||||||
@ -314,7 +315,8 @@ void dumpAccelMasks(FILE *f, const mcclellan *m, const mstate_aux *aux) {
|
|||||||
fprintf(f, "Acceleration\n");
|
fprintf(f, "Acceleration\n");
|
||||||
fprintf(f, "------------\n");
|
fprintf(f, "------------\n");
|
||||||
|
|
||||||
for (u16 i = 0; i < m->state_count; i++) {
|
u16 sherman_ceil = m->has_wide == 1 ? m->wide_limit : m->state_count;
|
||||||
|
for (u16 i = 0; i < sherman_ceil; i++) {
|
||||||
if (!aux[i].accel_offset) {
|
if (!aux[i].accel_offset) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -360,7 +362,8 @@ void dumpCommonHeader(FILE *f, const mcclellan *m) {
|
|||||||
static
|
static
|
||||||
void dumpTransitions(FILE *f, const NFA *nfa, const mcclellan *m,
|
void dumpTransitions(FILE *f, const NFA *nfa, const mcclellan *m,
|
||||||
const mstate_aux *aux) {
|
const mstate_aux *aux) {
|
||||||
for (u16 i = 0; i < m->state_count; i++) {
|
u16 sherman_ceil = m->has_wide == 1 ? m->wide_limit : m->state_count;
|
||||||
|
for (u16 i = 0; i < sherman_ceil; i++) {
|
||||||
fprintf(f, "%05hu", i);
|
fprintf(f, "%05hu", i);
|
||||||
if (aux[i].accel_offset) {
|
if (aux[i].accel_offset) {
|
||||||
dumpAccelText(f, (const union AccelAux *)((const char *)m +
|
dumpAccelText(f, (const union AccelAux *)((const char *)m +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user