mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Perform an early removeRedundancy call on graph
This allows sibling character classes to be merged together before graph component splitting is done by calcComponents(). In particular, this transforms (A|a)(B|b)(C|c) into [Aa][Bb][Cc] earlier.
This commit is contained in:
parent
86a52971ca
commit
326abeb3ee
@ -402,6 +402,13 @@ bool NG::addGraph(NGWrapper &w) {
|
||||
|
||||
dumpDotWrapper(w, "03_early", cc.grey);
|
||||
|
||||
// Perform a reduction pass to merge sibling character classes together.
|
||||
if (cc.grey.performGraphSimplification) {
|
||||
removeRedundancy(w, som);
|
||||
}
|
||||
|
||||
dumpDotWrapper(w, "04_reduced", cc.grey);
|
||||
|
||||
// If we've got some literals that span the graph from start to accept, we
|
||||
// can split them off into Rose from here.
|
||||
if (!som) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user