51 return std::strong_ordering::equal;
78 template <
typename Base >
82template <
typename Base >
84 if constexpr ( std::is_integral_v < Base > ) {
86 }
else if constexpr ( std::is_same_v < Base, std::string > ) {
87 return std::string (
"S" );
88 }
else if constexpr ( std::is_same_v < Base, InitialSymbol > ) {
90 }
else if constexpr ( std::is_same_v < Base, object::Object > ) {
92 }
else if constexpr ( std::is_same_v < Base, common::ranked_symbol < > > ) {
95 static_assert ( std::is_same_v < Base, Base >,
"Unsupported type of instance" );
Represents initial symbol used as an initial symbol of a grammar.
Definition: InitialSymbol.h:35
InitialSymbol()
Creates a new instance of the symbol.
bool operator==(const InitialSymbol &) const
Definition: InitialSymbol.h:61
std::strong_ordering operator<=>(const InitialSymbol &) const
Definition: InitialSymbol.h:50
friend ext::ostream & operator<<(ext::ostream &out, const InitialSymbol &instance)
Definition: InitialSymbol.cpp:16
static Base instance()
Factory for the symbol construction of the symbol based on given type.
Definition: InitialSymbol.h:83
Definition: ranked_symbol.hpp:20
Definition: BarSymbol.cpp:12