Skip to content
Snippets Groups Projects
Commit f5e5aed1 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

replace last occs of alphabet::Symbol with params

parent c90b5828
No related branches found
No related tags found
No related merge requests found
...@@ -82,7 +82,7 @@ inline Symbol SubtreeWildcardSymbol::instance < Symbol > ( ) { ...@@ -82,7 +82,7 @@ inline Symbol SubtreeWildcardSymbol::instance < Symbol > ( ) {
// TODO make partially specialised when needed by classes or variables, functions can be partially specialsed // TODO make partially specialised when needed by classes or variables, functions can be partially specialsed
template < > template < >
inline std::ranked_symbol < > SubtreeWildcardSymbol::instance < std::ranked_symbol < > > ( ) { inline std::ranked_symbol < > SubtreeWildcardSymbol::instance < std::ranked_symbol < > > ( ) {
return std::ranked_symbol < > ( Symbol ( SubtreeWildcardSymbol ( ) ), 0); return std::ranked_symbol < > ( DefaultSymbolType ( SubtreeWildcardSymbol ( ) ), 0);
} }
   
template < > template < >
......
...@@ -82,7 +82,7 @@ inline Symbol VariablesBarSymbol::instance < Symbol > ( ) { ...@@ -82,7 +82,7 @@ inline Symbol VariablesBarSymbol::instance < Symbol > ( ) {
// TODO make partially specialised when needed by classes or variables, functions can be partially specialsed // TODO make partially specialised when needed by classes or variables, functions can be partially specialsed
template < > template < >
inline std::ranked_symbol < > VariablesBarSymbol::instance < std::ranked_symbol < > > ( ) { inline std::ranked_symbol < > VariablesBarSymbol::instance < std::ranked_symbol < > > ( ) {
return std::ranked_symbol < > ( Symbol ( VariablesBarSymbol ( ) ), 0); return std::ranked_symbol < > ( DefaultSymbolType ( VariablesBarSymbol ( ) ), 0);
} }
   
template < > template < >
......
...@@ -76,17 +76,17 @@ public: ...@@ -76,17 +76,17 @@ public:
}; };
   
template < class SymbolType, class RankType > 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 > 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 > 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)) {
   
} }
   
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include "alphabet/RankedSymbol.h" #include "alphabet/RankedSymbol.h"
#include "alphabet/BarSymbol.h" #include "alphabet/BarSymbol.h"
   
#include <common/DefaultSymbolType.h>
#include "factory/XmlDataFactory.hpp" #include "factory/XmlDataFactory.hpp"
   
#define CPPUNIT_IMPLY( x, y ) CPPUNIT_ASSERT ( !( x ) || ( y ) ) #define CPPUNIT_IMPLY( x, y ) CPPUNIT_ASSERT ( !( x ) || ( y ) )
...@@ -67,8 +69,8 @@ void SymbolTest::testOrder ( ) { ...@@ -67,8 +69,8 @@ void SymbolTest::testOrder ( ) {
alphabet::StartSymbol ss; alphabet::StartSymbol ss;
alphabet::EndSymbol es; alphabet::EndSymbol es;
   
alphabet::RankedSymbol < > rs1 ( alphabet::Symbol ( alphabet::BarSymbol { } ), 0 ); alphabet::RankedSymbol < > rs1 ( DefaultSymbolType ( alphabet::BarSymbol { } ), 0 );
alphabet::RankedSymbol < > rs2 ( alphabet::Symbol ( alphabet::BarSymbol { } ), 0 ); alphabet::RankedSymbol < > rs2 ( DefaultSymbolType ( alphabet::BarSymbol { } ), 0 );
   
CPPUNIT_EXCLUSIVE_OR ( bs < ls, ls < bs ); CPPUNIT_EXCLUSIVE_OR ( bs < ls, ls < bs );
   
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment