diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.h b/alib2data/src/alphabet/SubtreeWildcardSymbol.h index 01d24677bdbf3dac885250520c0fc42b2f559439..6fcee7dadc73f5c334ef11e88f76af81e21c46fc 100644 --- a/alib2data/src/alphabet/SubtreeWildcardSymbol.h +++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.h @@ -82,7 +82,7 @@ inline Symbol SubtreeWildcardSymbol::instance < Symbol > ( ) { // TODO make partially specialised when needed by classes or variables, functions can be partially specialsed template < > inline std::ranked_symbol < > SubtreeWildcardSymbol::instance < std::ranked_symbol < > > ( ) { - return std::ranked_symbol < > ( Symbol ( SubtreeWildcardSymbol ( ) ), 0); + return std::ranked_symbol < > ( DefaultSymbolType ( SubtreeWildcardSymbol ( ) ), 0); } template < > diff --git a/alib2data/src/alphabet/VariablesBarSymbol.h b/alib2data/src/alphabet/VariablesBarSymbol.h index 585b50c76ca8bd95471661c6e74dd64fffa2f517..78c82b8625305787e759cd66ef610e71964a5a34 100644 --- a/alib2data/src/alphabet/VariablesBarSymbol.h +++ b/alib2data/src/alphabet/VariablesBarSymbol.h @@ -82,7 +82,7 @@ inline Symbol VariablesBarSymbol::instance < Symbol > ( ) { // TODO make partially specialised when needed by classes or variables, functions can be partially specialsed template < > inline std::ranked_symbol < > VariablesBarSymbol::instance < std::ranked_symbol < > > ( ) { - return std::ranked_symbol < > ( Symbol ( VariablesBarSymbol ( ) ), 0); + return std::ranked_symbol < > ( DefaultSymbolType ( VariablesBarSymbol ( ) ), 0); } template < > diff --git a/alib2data/src/alphabet/ranked_symbol.hpp b/alib2data/src/alphabet/ranked_symbol.hpp index cbed85110026b13629f94314e17d6d8599b57242..02db0acde7ceb126c5a0529d5c6ae4220fb450d0 100644 --- a/alib2data/src/alphabet/ranked_symbol.hpp +++ b/alib2data/src/alphabet/ranked_symbol.hpp @@ -76,17 +76,17 @@ public: }; template < class SymbolType, class RankType > -ranked_symbol < SymbolType, RankType >::ranked_symbol(int number, unsigned rank) : m_symbol(alphabet::Symbol(number)), m_rank(RankType(rank)) { +ranked_symbol < SymbolType, RankType >::ranked_symbol(int number, unsigned rank) : m_symbol(SymbolType(number)), m_rank(RankType(rank)) { } template < class SymbolType, class RankType > -ranked_symbol < SymbolType, RankType >::ranked_symbol(char character, unsigned rank) : m_symbol(alphabet::Symbol(character)), m_rank(RankType(rank)) { +ranked_symbol < SymbolType, RankType >::ranked_symbol(char character, unsigned rank) : m_symbol(SymbolType(character)), m_rank(RankType(rank)) { } template < class SymbolType, class RankType > -ranked_symbol < SymbolType, RankType >::ranked_symbol(std::string symbol, unsigned rank) : m_symbol(alphabet::Symbol(std::move(symbol))), m_rank(RankType(rank)) { +ranked_symbol < SymbolType, RankType >::ranked_symbol(std::string symbol, unsigned rank) : m_symbol(SymbolType(std::move(symbol))), m_rank(RankType(rank)) { } diff --git a/alib2data/test-src/alphabet/SymbolTest.cpp b/alib2data/test-src/alphabet/SymbolTest.cpp index c5641a4a72d1fa531267fedbfbdd75ee93af4a9b..50b6209efeb674ef77f352db3013f42135f19598 100644 --- a/alib2data/test-src/alphabet/SymbolTest.cpp +++ b/alib2data/test-src/alphabet/SymbolTest.cpp @@ -12,6 +12,8 @@ #include "alphabet/RankedSymbol.h" #include "alphabet/BarSymbol.h" +#include <common/DefaultSymbolType.h> + #include "factory/XmlDataFactory.hpp" #define CPPUNIT_IMPLY( x, y ) CPPUNIT_ASSERT ( !( x ) || ( y ) ) @@ -67,8 +69,8 @@ void SymbolTest::testOrder ( ) { alphabet::StartSymbol ss; alphabet::EndSymbol es; - alphabet::RankedSymbol < > rs1 ( alphabet::Symbol ( alphabet::BarSymbol { } ), 0 ); - alphabet::RankedSymbol < > rs2 ( alphabet::Symbol ( alphabet::BarSymbol { } ), 0 ); + alphabet::RankedSymbol < > rs1 ( DefaultSymbolType ( alphabet::BarSymbol { } ), 0 ); + alphabet::RankedSymbol < > rs2 ( DefaultSymbolType ( alphabet::BarSymbol { } ), 0 ); CPPUNIT_EXCLUSIVE_OR ( bs < ls, ls < bs );