mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-20 10:56:40 +03:00
add new Literal API for pure literal expressions:
Design compile time api hs_compile_lit() and hs_compile_lit_multi() to handle pure literal pattern sets. Corresponding option --literal-on is added for hyperscan testing suites. Extended parameters and part of flags are not supported for this api.
This commit is contained in:
committed by
Chang, Harry
parent
8bfbf07f75
commit
23e5f06594
@@ -340,14 +340,7 @@ public:
|
||||
std::pair<u32, bool> insert(const rose_literal_id &lit) {
|
||||
auto it = lits_index.find(lit);
|
||||
if (it != lits_index.end()) {
|
||||
u32 idx = it->second;
|
||||
auto &l = lits.at(idx);
|
||||
if (!lit.s.get_pure() && l.s.get_pure()) {
|
||||
lits_index.erase(l);
|
||||
l.s.unset_pure();
|
||||
lits_index.emplace(l, idx);
|
||||
}
|
||||
return {idx, false};
|
||||
return {it->second, false};
|
||||
}
|
||||
u32 id = verify_u32(lits.size());
|
||||
lits.push_back(lit);
|
||||
|
||||
Reference in New Issue
Block a user