mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
limex_dump: dump LimEx type and flags in text
This commit is contained in:
parent
8713cfbd9e
commit
578277e535
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -290,6 +290,20 @@ static
|
||||
void dumpLimexText(const limex_type *limex, FILE *f) {
|
||||
u32 size = limex_traits<limex_type>::size;
|
||||
|
||||
fprintf(f, "%u-bit LimEx NFA (%u shifts, %u exceptions)\n", size,
|
||||
limex->shiftCount, limex->exceptionCount);
|
||||
fprintf(f, "flags: ");
|
||||
if (limex->flags & LIMEX_FLAG_COMPRESS_STATE) {
|
||||
fprintf(f, "COMPRESS_STATE ");
|
||||
}
|
||||
if (limex->flags & LIMEX_FLAG_COMPRESS_MASKED) {
|
||||
fprintf(f, "COMPRESS_MASKED ");
|
||||
}
|
||||
if (limex->flags & LIMEX_FLAG_CANNOT_DIE) {
|
||||
fprintf(f, "CANNOT_DIE ");
|
||||
}
|
||||
fprintf(f, "\n\n");
|
||||
|
||||
dumpMask(f, "init", (const u8 *)&limex->init, size);
|
||||
dumpMask(f, "init_dot_star", (const u8 *)&limex->initDS, size);
|
||||
dumpMask(f, "accept", (const u8 *)&limex->accept, size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user