mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 09:45:28 +03:00
next batch
This commit is contained in:
@@ -130,6 +130,7 @@ vector<PositionInfo> ComponentAlternation::last() const {
|
||||
|
||||
bool ComponentAlternation::empty(void) const {
|
||||
// an alternation can be empty if any of its components are empty
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
for (const auto &c : children) {
|
||||
if (c->empty()) {
|
||||
return true;
|
||||
@@ -173,6 +174,7 @@ bool ComponentAlternation::checkEmbeddedEndAnchor(bool at_end) const {
|
||||
}
|
||||
|
||||
bool ComponentAlternation::vacuous_everywhere(void) const {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
for (const auto &c : children) {
|
||||
if (c->vacuous_everywhere()) {
|
||||
return true;
|
||||
|
||||
@@ -113,6 +113,7 @@ static
|
||||
void checkPositions(vector<PositionInfo> &v, const GlushkovBuildState &bs) {
|
||||
const NFABuilder& builder = bs.getBuilder();
|
||||
for (const auto &e : v) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
if (builder.isSpecialState(e.pos)) {
|
||||
throw ParseError("Embedded anchors not supported.");
|
||||
}
|
||||
@@ -341,6 +342,7 @@ inf_check:
|
||||
|
||||
static
|
||||
bool hasPositionFlags(const Component &c) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
for (const auto &e : c.first()) {
|
||||
if (e.flags) {
|
||||
return true;
|
||||
|
||||
@@ -253,6 +253,7 @@ vector<PositionInfo> ComponentSequence::last() const {
|
||||
|
||||
bool ComponentSequence::empty(void) const {
|
||||
// a sequence can be empty if all its subcomponents can be empty
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
for (const auto &c : children) {
|
||||
if (!c->empty()) {
|
||||
return false;
|
||||
@@ -342,6 +343,7 @@ bool ComponentSequence::checkEmbeddedEndAnchor(bool at_end) const {
|
||||
}
|
||||
|
||||
bool ComponentSequence::vacuous_everywhere() const {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
for (const auto &c : children) {
|
||||
if (!c->vacuous_everywhere()) {
|
||||
return false;
|
||||
|
||||
@@ -175,6 +175,7 @@ void checkEmbeddedEndAnchor(const PositionInfo &from,
|
||||
}
|
||||
|
||||
for (const auto &first : firsts) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
if (first.pos != GlushkovBuildStateImpl::POS_EPSILON) {
|
||||
/* can make it through the parse tree */
|
||||
throw ParseError("Embedded end anchors not supported.");
|
||||
|
||||
Reference in New Issue
Block a user