mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 11:16:29 +03:00
remove !LBR constraints from merge passes
we have either converted candidates to castles already or we have converted them back in the hope of merging them with other holders
This commit is contained in:
@@ -346,24 +346,4 @@ bytecode_ptr<NFA> constructLBR(const NGHolder &g,
|
||||
return constructLBR(proto, triggers, cc, rm);
|
||||
}
|
||||
|
||||
/** \brief True if graph \p g could be turned into an LBR engine. */
|
||||
bool isLBR(const NGHolder &g, const Grey &grey) {
|
||||
if (!grey.allowLbr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
PureRepeat repeat;
|
||||
if (!isPureRepeat(g, repeat)) {
|
||||
DEBUG_PRINTF("not pure bounded repeat\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (repeat.reports.size() != 1) {
|
||||
DEBUG_PRINTF("too many reports\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace ue2
|
||||
|
@@ -66,9 +66,6 @@ constructLBR(const CastleProto &proto,
|
||||
const std::vector<std::vector<CharReach>> &triggers,
|
||||
const CompileContext &cc, const ReportManager &rm);
|
||||
|
||||
/** \brief True if graph \p g could be turned into an LBR engine. */
|
||||
bool isLBR(const NGHolder &g, const Grey &grey);
|
||||
|
||||
} // namespace ue2
|
||||
|
||||
#endif // NG_LBR_H
|
||||
|
Reference in New Issue
Block a user