diff --git a/alib2data/src/regexp/formal/FormalRegExp.cpp b/alib2data/src/regexp/formal/FormalRegExp.cpp index 0fa12a0085eda4791a2520e8e9de6622c6d66b18..62241b7b6b5cdfb9f8f2e2d001a5ce3c8c80005b 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.cpp +++ b/alib2data/src/regexp/formal/FormalRegExp.cpp @@ -138,14 +138,6 @@ bool FormalRegExp::removeSymbolFromAlphabet(const alphabet::Symbol & symbol) { return alphabet.erase(symbol); } -bool FormalRegExp::isEmpty() const { - return regExp->isEmpty(); -} - -bool FormalRegExp::containsEmptyString() const { - return regExp->containsEmptyString(); -} - void FormalRegExp::operator >>(std::ostream& out) const { out << "(FormalRegExp " << *(this->regExp) << ")"; } diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h index 3c0b587b4c643c346383f419e16bfb5bd30ea961..e52d6c6ad289499f7c89a47341b837f307c6c2fa 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.h +++ b/alib2data/src/regexp/formal/FormalRegExp.h @@ -105,16 +105,6 @@ public: */ bool removeSymbolFromAlphabet(const alphabet::Symbol & symbol); - /** - * @return true if regexp represents empty language - */ - bool isEmpty() const; - - /** - * @return true if regexp matches empty string (epsilon) - */ - bool containsEmptyString() const; - /** * Prints XML representation of the RegExp to the output stream. * @param out output stream to which print the RegExp diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp b/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp index 9ef0dd825366ba66dc23a7c2a6a3318d7195745f..81b85de9aa73a9edef08c82d6f5a45d1f413fe7d 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp @@ -176,12 +176,4 @@ void FormalRegExpAlternation::computeMinimalAlphabet( std::set<alphabet::Symbol> right->computeMinimalAlphabet(alphabet); } -bool FormalRegExpAlternation::containsEmptyString() const { - return left->containsEmptyString() || right->containsEmptyString(); -} - -bool FormalRegExpAlternation::isEmpty() const { - return left->isEmpty() && right->isEmpty(); -} - } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.h b/alib2data/src/regexp/formal/FormalRegExpAlternation.h index 00376a6fc93cace806aff5bace5b59b14205ec50..de9886b04a29aa374db85fb3b4830685ca7afa89 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.h +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.h @@ -98,15 +98,6 @@ public: */ virtual void operator>>(std::ostream& out) const; - /** - * @copydoc FormalRegExpElement::containsEmptyString() const - */ - virtual bool containsEmptyString() const; - - /** - * @copydoc FormalRegExpElement::isEmpty() const - */ - virtual bool isEmpty() const; }; } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp b/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp index dab550bb6a20dac134b98273658cc382bbcf25ab..c65187ec1f1e0ce7dc6eaafa57058898b2cbadc8 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp @@ -176,12 +176,4 @@ void FormalRegExpConcatenation::computeMinimalAlphabet( std::set<alphabet::Symbo right->computeMinimalAlphabet(alphabet); } -bool FormalRegExpConcatenation::containsEmptyString() const { - return left->containsEmptyString() && right->containsEmptyString(); -} - -bool FormalRegExpConcatenation::isEmpty() const { - return left->isEmpty() || right->isEmpty(); -} - } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h index b2828eddc0a6acc4ecb3d9bd0b44077ebc3adb65..91405bdc4f0242e63e1c8b5c5afb4878be4613b8 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h @@ -94,16 +94,6 @@ public: * @copydoc FormalRegExpElement::operator>>() const */ virtual void operator>>(std::ostream& out) const; - - /** - * @copydoc FormalRegExpElement::containsEmptyString() const - */ - virtual bool containsEmptyString() const; - - /** - * @copydoc FormalRegExpElement::isEmpty() const - */ - virtual bool isEmpty() const; }; } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpElement.h b/alib2data/src/regexp/formal/FormalRegExpElement.h index a8c83b1522d0e33bcbf3304e6ad6c8d970c31587..d39e8adb2c6395ae22e25e47be53a066e3a60c8f 100644 --- a/alib2data/src/regexp/formal/FormalRegExpElement.h +++ b/alib2data/src/regexp/formal/FormalRegExpElement.h @@ -114,16 +114,6 @@ public: */ friend std::ostream& operator<<(std::ostream& out, const FormalRegExpElement& regexp); - /** - * @return true if this subtree of regexp matches empty string (epsilon) - */ - virtual bool containsEmptyString() const = 0; - - /** - * @return true if this subtree describes empty language - */ - virtual bool isEmpty() const = 0; - friend class FormalRegExp; friend class FormalRegExpAlternation; diff --git a/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp b/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp index 17f69d97b82ad1023e31a6bfb5534a7ebe2ebcad..fb070961aa501a3e6e69a11e95f86c08cc2b530c 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp @@ -83,12 +83,4 @@ void FormalRegExpEmpty::computeMinimalAlphabet( std::set<alphabet::Symbol>&) con } -bool FormalRegExpEmpty::containsEmptyString() const { - return false; -} - -bool FormalRegExpEmpty::isEmpty() const { - return true; -} - } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpEmpty.h b/alib2data/src/regexp/formal/FormalRegExpEmpty.h index cbda513868152f33fef4a92cd19ce2d8a2ff7f9e..036bdc40af223533696de967b25cdd86802e6827 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEmpty.h +++ b/alib2data/src/regexp/formal/FormalRegExpEmpty.h @@ -65,16 +65,6 @@ public: * @copydoc FormalRegExpElement::operator>>() const */ virtual void operator>>(std::ostream& out) const; - - /** - * @copydoc FormalRegExpElement::containsEmptyString() const - */ - virtual bool containsEmptyString() const; - - /** - * @copydoc FormalRegExpElement::isEmpty() const - */ - virtual bool isEmpty() const; }; } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp b/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp index b434618e3a1e913c9121468d7130a36a55ffe5bb..1629e334e0e87ad87b4cea5791e019bface344e3 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp @@ -31,7 +31,7 @@ FormalRegExpEpsilon& FormalRegExpEpsilon::operator =(FormalRegExpEpsilon&&) noex //this is actually different than default implementation return *this; } - + FormalRegExpElement* FormalRegExpEpsilon::clone() const { return new FormalRegExpEpsilon(*this); } @@ -83,12 +83,4 @@ void FormalRegExpEpsilon::computeMinimalAlphabet( std::set<alphabet::Symbol>&) c } -bool FormalRegExpEpsilon::containsEmptyString() const { - return true; -} - -bool FormalRegExpEpsilon::isEmpty() const { - return false; -} - } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h index 2551f68dbd37f036ec37f811f15e446d83427034..0b62f7b51875e3b51bde033c923274190f81549c 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h +++ b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h @@ -38,7 +38,7 @@ protected: virtual void computeMinimalAlphabet( std::set<alphabet::Symbol>& alphabet ) const; public: - + FormalRegExpEpsilon(); FormalRegExpEpsilon(const FormalRegExpEpsilon& other); FormalRegExpEpsilon(FormalRegExpEpsilon&& other) noexcept; @@ -66,16 +66,6 @@ public: * @copydoc FormalRegExpElement::operator>>() const */ virtual void operator>>(std::ostream& out) const; - - /** - * @copydoc FormalRegExpElement::containsEmptyString() const - */ - virtual bool containsEmptyString() const; - - /** - * @copydoc FormalRegExpElement::isEmpty() const - */ - virtual bool isEmpty() const; }; } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.cpp b/alib2data/src/regexp/formal/FormalRegExpIteration.cpp index 6f851535e68efa4b76b557ea763b0c2d3ab6ff8a..f255ee33dab2a9ba4b7fb446988079b19df863e0 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.cpp @@ -130,13 +130,5 @@ void FormalRegExpIteration::computeMinimalAlphabet( std::set<alphabet::Symbol>& element->computeMinimalAlphabet(alphabet); } -bool FormalRegExpIteration::containsEmptyString() const { - return true; -} - -bool FormalRegExpIteration::isEmpty() const { - return false; -} - } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.h b/alib2data/src/regexp/formal/FormalRegExpIteration.h index 71ecd1539d9d004c9bff125419426f6d4944b4e0..e777b0e4337970298824db5ca4b9cd8cc1fd28f1 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.h +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.h @@ -90,16 +90,6 @@ public: * @copydoc FormalRegExpElement::operator>>() const */ virtual void operator>>(std::ostream& out) const; - - /** - * @copydoc FormalRegExpElement::containsEmptyString() const - */ - virtual bool containsEmptyString() const; - - /** - * @copydoc FormalRegExpElement::isEmpty() const - */ - virtual bool isEmpty() const; }; } /* namespace regexp */ diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp b/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp index 356e93f3a89bab18ac2f5cca3113219a9437bf13..52d255b51ee4a084b45b0f1a36a6b34e16b03d66 100644 --- a/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp @@ -102,14 +102,6 @@ void FormalRegExpSymbol::operator>>(std::ostream& out) const { out << "(FormalRegExpSymbol " << symbol << ")"; } -bool FormalRegExpSymbol::containsEmptyString() const { - return false; -} - -bool FormalRegExpSymbol::isEmpty() const { - return false; -} - bool FormalRegExpSymbol::testSymbol( const alphabet::Symbol & symbol ) const { return symbol == this->symbol; } diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.h b/alib2data/src/regexp/formal/FormalRegExpSymbol.h index ad8ec2ed6b6bc2a3b3e82a8383ecf3413b61bd8d..85e438df57cb5cb9a89a4f7d89f9acbaad03e07a 100644 --- a/alib2data/src/regexp/formal/FormalRegExpSymbol.h +++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.h @@ -79,20 +79,10 @@ public: */ virtual void operator>>(std::ostream& out) const; - /** - * @copydoc FormalRegExpElement::containsEmptyString() const - */ - virtual bool containsEmptyString() const; - /** * Returns the string representation of RegExp Symbol. */ const alphabet::Symbol& getSymbol() const; - - /** - * @copydoc FormalRegExpElement::isEmpty() const - */ - virtual bool isEmpty() const; }; } /* namespace regexp */