diff --git a/alib/src/regexp/Alternation.cpp b/alib/src/regexp/Alternation.cpp index 81ff4f56fafce9c54c6968c92b424c3abceb9b58..180d2413f4e6058b7849209301ea624f7b3ddab9 100644 --- a/alib/src/regexp/Alternation.cpp +++ b/alib/src/regexp/Alternation.cpp @@ -109,9 +109,9 @@ bool Alternation::containsEmptyString() const { bool Alternation::isEmpty() const { for(const auto& e : getElements()) if(!e->isEmpty()) - return true; + return false; - return false; + return true; } } /* namespace regexp */ diff --git a/alib/src/regexp/Concatenation.cpp b/alib/src/regexp/Concatenation.cpp index 602ebde3c8a4d2386d1e0151a8e82ce3d02a2807..d06806fcf2ee4a33a5d6e7a8c7f2d22611c69e17 100644 --- a/alib/src/regexp/Concatenation.cpp +++ b/alib/src/regexp/Concatenation.cpp @@ -104,10 +104,10 @@ bool Concatenation::containsEmptyString() const { bool Concatenation::isEmpty() const { for(const auto& e : getElements()) - if(!e->isEmpty()) - return false; + if(e->isEmpty()) + return true; - return true; + return false; } } /* namespace regexp */