diff --git a/aconversions/src/aconversion/ConversionHandler.cpp b/aconversions/src/aconversion/ConversionHandler.cpp index 116b69488dc6e463d4259c51ee047dbe3de3eba7..8de6c2abd788c681dcdc711e331483a273642eec 100644 --- a/aconversions/src/aconversion/ConversionHandler.cpp +++ b/aconversions/src/aconversion/ConversionHandler.cpp @@ -68,7 +68,7 @@ void ConversionHandler::convertGrammar( ostream & out ) } conv->convert( ).toXML( out ); - // delete conv; + delete conv; } else if( m_target == REGULAR_EXPRESSION ) @@ -91,7 +91,7 @@ void ConversionHandler::convertRegExp( ostream & out ) conv = new Glushkov( regexp ); conv->convert( ).toXML( out ); - // delete conv; + delete conv; } else if( m_target == REGULAR_GRAMMAR ) @@ -126,7 +126,7 @@ void ConversionHandler::convertAutomata( ostream & out ) conv = new FAtoRRGConverter( fsm ); conv->convert( ).toXML( out ); - //delete conv; + delete conv; } } diff --git a/aconversions/src/fa2re/AbstractFAtoREConverter.h b/aconversions/src/fa2re/AbstractFAtoREConverter.h index e45fc67ad87e94607081320153c59abd0940ab79..0dee38f1d39f5e318bcbe93e83c9dead556bb3ee 100644 --- a/aconversions/src/fa2re/AbstractFAtoREConverter.h +++ b/aconversions/src/fa2re/AbstractFAtoREConverter.h @@ -15,10 +15,10 @@ class AbstractFAtoREConverter : public Conversion { public: virtual regexp::RegExp convert( ) = 0; + virtual ~AbstractFAtoREConverter( void ); protected: AbstractFAtoREConverter( const automaton::FSM & automaton ); - virtual ~AbstractFAtoREConverter( void ); const automaton::FSM & m_automaton; regexp::RegExp m_re; diff --git a/aconversions/src/fa2rg/AbstractFAtoRGConverter.h b/aconversions/src/fa2rg/AbstractFAtoRGConverter.h index 4987910011a6a80566a3fa30090b87ba23861f7d..c6b632f2261de3473de5362c6d212bf4678f9c46 100644 --- a/aconversions/src/fa2rg/AbstractFAtoRGConverter.h +++ b/aconversions/src/fa2rg/AbstractFAtoRGConverter.h @@ -15,10 +15,10 @@ class AbstractFAtoRGConverter : public Conversion { public: virtual grammar::RegularGrammar & convert( ) = 0; + virtual ~AbstractFAtoRGConverter( void ); protected: AbstractFAtoRGConverter( const automaton::FSM & automaton, grammar::RegularGrammar * grammar ); - virtual ~AbstractFAtoRGConverter( void ); void createNonTerminalSymbols( void ); void createTerminalSymbols( void ); diff --git a/aconversions/src/fa2rg/FAtoLRGConverter.cpp b/aconversions/src/fa2rg/FAtoLRGConverter.cpp index 3c4fb47966108d8bd095fbb4cc15dd63bfdd903b..00dd36a5364a8af9fe96ed0a40dbca4f7e886f92 100644 --- a/aconversions/src/fa2rg/FAtoLRGConverter.cpp +++ b/aconversions/src/fa2rg/FAtoLRGConverter.cpp @@ -14,6 +14,11 @@ FAtoLRGConverter::FAtoLRGConverter( const FSM & automaton ) : AbstractFAtoRGConv } +FAtoLRGConverter::~FAtoLRGConverter( void ) +{ + +} + LeftRegularGrammar & FAtoLRGConverter::convert( void ) { createTerminalSymbols( ); diff --git a/aconversions/src/fa2rg/FAtoLRGConverter.h b/aconversions/src/fa2rg/FAtoLRGConverter.h index a878b782e5db289682b3f292e0d6eef6f416bd51..328d7edd43321928f387b14ded82aed7d83c6b94 100644 --- a/aconversions/src/fa2rg/FAtoLRGConverter.h +++ b/aconversions/src/fa2rg/FAtoLRGConverter.h @@ -13,6 +13,7 @@ class FAtoLRGConverter: public AbstractFAtoRGConverter { public: FAtoLRGConverter( const automaton::FSM & automaton ); + ~FAtoLRGConverter( void ); grammar::LeftRegularGrammar & convert( ); protected: diff --git a/aconversions/src/fa2rg/FAtoRRGConverter.cpp b/aconversions/src/fa2rg/FAtoRRGConverter.cpp index c5c52bcad81f6aa66c0c0e7ba366dcdcb5304314..b0f6f461b7c50ba5383ec4105d187f795cc234cc 100644 --- a/aconversions/src/fa2rg/FAtoRRGConverter.cpp +++ b/aconversions/src/fa2rg/FAtoRRGConverter.cpp @@ -9,6 +9,12 @@ namespace conversions FAtoRRGConverter::FAtoRRGConverter( const FSM & automaton ) : AbstractFAtoRGConverter( automaton, new RightRegularGrammar() ), m_grammar(* dynamic_cast<RightRegularGrammar*>( m_g )) { + +} + +FAtoRRGConverter::~FAtoRRGConverter( void ) +{ + } RightRegularGrammar & FAtoRRGConverter::convert( void ) diff --git a/aconversions/src/fa2rg/FAtoRRGConverter.h b/aconversions/src/fa2rg/FAtoRRGConverter.h index 0790af83b5e8ed691e69d0aaf4d10ffed65ea8da..7738b8ade917ecb2211974d3699339c3029a65d0 100644 --- a/aconversions/src/fa2rg/FAtoRRGConverter.h +++ b/aconversions/src/fa2rg/FAtoRRGConverter.h @@ -13,6 +13,7 @@ class FAtoRRGConverter : public AbstractFAtoRGConverter { public: FAtoRRGConverter( const automaton::FSM & automaton ); + ~FAtoRRGConverter( void ); grammar::RightRegularGrammar & convert ( ); protected: diff --git a/aconversions/src/re2fa/AbstractREtoFAConverter.h b/aconversions/src/re2fa/AbstractREtoFAConverter.h index c66284b647b80e4204d7082f4a7c7312d57572b9..e7fd3b85242f2ed5d8bd7bc72da692975fb46742 100644 --- a/aconversions/src/re2fa/AbstractREtoFAConverter.h +++ b/aconversions/src/re2fa/AbstractREtoFAConverter.h @@ -16,10 +16,10 @@ class AbstractREtoFAConverter : public Conversion { public: virtual automaton::FSM convert( void ) = 0; + virtual ~AbstractREtoFAConverter( void ); protected: AbstractREtoFAConverter(const regexp::RegExp & re ); - virtual ~AbstractREtoFAConverter( void ); const regexp::RegExp & m_re; automaton::FSM m_fsm; diff --git a/aconversions/src/re2fa/Brzozowski.cpp b/aconversions/src/re2fa/Brzozowski.cpp index f0f480575d070be3919ad52fc2cf0839d99ccf34..4097e9b86dcba383ff3909b5f2065b2e8ac64326 100644 --- a/aconversions/src/re2fa/Brzozowski.cpp +++ b/aconversions/src/re2fa/Brzozowski.cpp @@ -19,6 +19,11 @@ Brzozowski::Brzozowski( const RegExp & re ) : AbstractREtoFAConverter( re ) } +Brzozowski::~Brzozowski( void ) +{ + +} + FSM Brzozowski::convert( void ) { RegExpOptimize opt; diff --git a/aconversions/src/re2fa/Brzozowski.h b/aconversions/src/re2fa/Brzozowski.h index cfe970e5fc6d74aa3037c202e670655a15499f98..2baf48c254678a969954c51e166bdaebedae4c03 100644 --- a/aconversions/src/re2fa/Brzozowski.h +++ b/aconversions/src/re2fa/Brzozowski.h @@ -31,6 +31,7 @@ class Brzozowski : public AbstractREtoFAConverter { public: Brzozowski( const regexp::RegExp & re ); + ~Brzozowski( void ); automaton::FSM convert( void ); private: diff --git a/aconversions/src/re2fa/Glushkov.cpp b/aconversions/src/re2fa/Glushkov.cpp index b3c4e060c82a7b10bb621b18a6067c11a8a376b9..8a137ff031bec78be210738a7ff85bb33c6d8792 100644 --- a/aconversions/src/re2fa/Glushkov.cpp +++ b/aconversions/src/re2fa/Glushkov.cpp @@ -21,6 +21,11 @@ Glushkov::Glushkov( const RegExp & re ) : AbstractREtoFAConverter( re ) } +Glushkov::~Glushkov( void ) +{ + +} + FSM Glushkov::convert( void ) { // step 1 diff --git a/aconversions/src/re2fa/Glushkov.h b/aconversions/src/re2fa/Glushkov.h index 525750b4b60fc37d93c927048c25285a5e0ae00e..452028c1f496818e536bef3a2226c024cec1b465 100644 --- a/aconversions/src/re2fa/Glushkov.h +++ b/aconversions/src/re2fa/Glushkov.h @@ -31,6 +31,7 @@ class Glushkov : public AbstractREtoFAConverter { public: Glushkov( const regexp::RegExp & re ); + ~Glushkov( void ); automaton::FSM convert( void ); private: diff --git a/aconversions/src/re2fa/Thompson.cpp b/aconversions/src/re2fa/Thompson.cpp index a8025b9f21f648f9e9c6659594e6471c39ed2abb..f5f72e31327a4fec6a5acf2fc8409c1baf7be7d0 100644 --- a/aconversions/src/re2fa/Thompson.cpp +++ b/aconversions/src/re2fa/Thompson.cpp @@ -18,6 +18,12 @@ Thompson::Thompson( const RegExp & re ) : AbstractREtoFAConverter( re ) } +Thompson::~Thompson( void ) +{ + +} + + FSM Thompson::convert( void ) { for( const auto & symbol : RegExpAlphabet::getSymbols( m_re ) ) diff --git a/aconversions/src/re2fa/Thompson.h b/aconversions/src/re2fa/Thompson.h index d14ca6940075fd07bdf38dd9d245c264657a2b41..8ab66196cf9afcd225610fce723a4266ff486280 100644 --- a/aconversions/src/re2fa/Thompson.h +++ b/aconversions/src/re2fa/Thompson.h @@ -37,6 +37,7 @@ class Thompson : public AbstractREtoFAConverter { public: Thompson( const regexp::RegExp & re ); + ~Thompson( void ); automaton::FSM convert( void ); private: diff --git a/aconversions/src/rg2fa/AbstractRGtoFAConverter.h b/aconversions/src/rg2fa/AbstractRGtoFAConverter.h index 00b63f256c00998431b6d6186b9f2c7db41ee6ac..8555e31f75a7b4c07342fd4990e8fbb66e98ff63 100644 --- a/aconversions/src/rg2fa/AbstractRGtoFAConverter.h +++ b/aconversions/src/rg2fa/AbstractRGtoFAConverter.h @@ -16,10 +16,10 @@ class AbstractRGtoFAConverter : public Conversion { public: virtual automaton::FSM convert( void ) = 0; + virtual ~AbstractRGtoFAConverter( void ); protected: AbstractRGtoFAConverter( const grammar::RegularGrammar& grammar ); - virtual ~AbstractRGtoFAConverter( void ); void createStates( void ); void createInputAlphabet( void ); diff --git a/aconversions/src/rg2fa/LRGtoFAConverter.cpp b/aconversions/src/rg2fa/LRGtoFAConverter.cpp index 5dcf5a54b49de45721b06cd077dc855d66b31ceb..fdea21b7a2aea75fffae7c475898b165bdb33d53 100644 --- a/aconversions/src/rg2fa/LRGtoFAConverter.cpp +++ b/aconversions/src/rg2fa/LRGtoFAConverter.cpp @@ -12,6 +12,11 @@ LRGtoFAConverter::LRGtoFAConverter( const LeftRegularGrammar & grammar ) : Abstr //TODO: if is not LRG throw Exception } +LRGtoFAConverter::~LRGtoFAConverter( void ) +{ + +} + FSM LRGtoFAConverter::convert( void ) { createInputAlphabet( ); diff --git a/aconversions/src/rg2fa/LRGtoFAConverter.h b/aconversions/src/rg2fa/LRGtoFAConverter.h index a27e054777b90fa1b5199271c46823c5c3581dfe..f0f9a39b9e687f49f0c3c09b2bc6eb60ae1ea532 100644 --- a/aconversions/src/rg2fa/LRGtoFAConverter.h +++ b/aconversions/src/rg2fa/LRGtoFAConverter.h @@ -13,6 +13,7 @@ class LRGtoFAConverter : public AbstractRGtoFAConverter { public: LRGtoFAConverter( const grammar::LeftRegularGrammar & grammar ); + ~LRGtoFAConverter( void ); automaton::FSM convert( void ); }; diff --git a/aconversions/src/rg2fa/RRGtoFAConverter.cpp b/aconversions/src/rg2fa/RRGtoFAConverter.cpp index 67fa9cfad861b8f35a1c639aa94ca14ad5d0875c..ffe18ba402d300560510bf6419b36030e07eac49 100644 --- a/aconversions/src/rg2fa/RRGtoFAConverter.cpp +++ b/aconversions/src/rg2fa/RRGtoFAConverter.cpp @@ -12,6 +12,12 @@ RRGtoFAConverter::RRGtoFAConverter( const RightRegularGrammar & grammar ) : Abst //TODO: if is not RRG throw Exception } +RRGtoFAConverter::~RRGtoFAConverter( void ) +{ + +} + + FSM RRGtoFAConverter::convert( void ) { createInputAlphabet( ); diff --git a/aconversions/src/rg2fa/RRGtoFAConverter.h b/aconversions/src/rg2fa/RRGtoFAConverter.h index da057899d73ff8498a0d5e19c9c1561b1a4be4db..f8230cbe839f34a00dc337abb60620e70def06db 100644 --- a/aconversions/src/rg2fa/RRGtoFAConverter.h +++ b/aconversions/src/rg2fa/RRGtoFAConverter.h @@ -13,6 +13,7 @@ class RRGtoFAConverter : public AbstractRGtoFAConverter { public: RRGtoFAConverter( const grammar::RightRegularGrammar & grammar ); + ~RRGtoFAConverter( void ); automaton::FSM convert( void ); };