mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
rose: group final ids by fragment
This commit is contained in:
committed by
Matthew Barr
parent
07a6b6510c
commit
eb14792a63
@@ -37,6 +37,7 @@
|
||||
#include "ue2common.h"
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
namespace ue2 {
|
||||
@@ -111,6 +112,19 @@ struct hwlmLiteral {
|
||||
: hwlmLiteral(s_in, nocase_in, false, id_in, HWLM_ALL_GROUPS, {}, {}) {}
|
||||
};
|
||||
|
||||
inline
|
||||
bool operator<(const hwlmLiteral &a, const hwlmLiteral &b) {
|
||||
return std::tie(a.id, a.s, a.nocase, a.noruns, a.groups, a.msk, a.cmp) <
|
||||
std::tie(b.id, b.s, b.nocase, b.noruns, b.groups, b.msk, b.cmp);
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator==(const hwlmLiteral &a, const hwlmLiteral &b) {
|
||||
return a.id == b.id && a.s == b.s && a.nocase == b.nocase &&
|
||||
a.noruns == b.noruns && a.groups == b.groups && a.msk == b.msk &&
|
||||
a.cmp == b.cmp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Consistency test; returns false if the given msk/cmp test can never match
|
||||
* the literal string s.
|
||||
|
Reference in New Issue
Block a user