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:
Justin Viiret
2017-06-22 10:37:31 +10:00
committed by Matthew Barr
parent 3bd0c7f6ad
commit c83f2ea389
3 changed files with 155 additions and 95 deletions

View File

@@ -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;