mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-09 15:52:27 +03:00
rose_build_matchers: be more careful w/ mixed-case
Overhaul the way fragment literals are added to HWLM and accel, fix some bugs shaken out by stricter mask use.
This commit is contained in:
committed by
Matthew Barr
parent
3bd0c7f6ad
commit
c83f2ea389
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -320,23 +320,6 @@ bool ue2_literal::any_nocase() const {
|
||||
return find(nocase.begin(), nocase.end(), true) != nocase.end();
|
||||
}
|
||||
|
||||
bool mixed_sensitivity(const ue2_literal &s) {
|
||||
bool cs = false;
|
||||
bool nc = false;
|
||||
for (ue2_literal::const_iterator it = s.begin(); it != s.end(); ++it) {
|
||||
if (!ourisalpha(it->c)) {
|
||||
continue;
|
||||
}
|
||||
if (it->nocase) {
|
||||
nc = true;
|
||||
} else {
|
||||
cs = true;
|
||||
}
|
||||
}
|
||||
|
||||
return cs && nc;
|
||||
}
|
||||
|
||||
void make_nocase(ue2_literal *lit) {
|
||||
ue2_literal rv;
|
||||
|
||||
|
Reference in New Issue
Block a user