ng: ensure that only match states have reports

Ensure (and assert) that vertices without an edge to {accept, acceptEod}
do not have reports set.
This commit is contained in:
Justin Viiret
2016-07-18 12:41:31 +10:00
committed by Matthew Barr
parent 3d9a60d023
commit 4ce268af47
10 changed files with 70 additions and 20 deletions

View File

@@ -36,6 +36,7 @@
#include "nfa/nfa_internal.h"
#include "nfa/nfa_api_util.h"
#include "nfagraph/ng_lbr.h"
#include "nfagraph/ng_util.h"
#include "util/alloc.h"
#include "util/compile_context.h"
#include "grey.h"
@@ -97,6 +98,7 @@ protected:
ParsedExpression parsed(0, pattern.c_str(), flags, 0);
unique_ptr<NGWrapper> g = buildWrapper(rm, cc, parsed);
ASSERT_TRUE(g != nullptr);
clearReports(*g);
ASSERT_TRUE(isLBR(*g, grey));