19template<
class T,
template<
class>
class C_Ptr>
22template<
class T,
template<
class>
class C_Ptr>
31 {
return m_from(
size_t(n + m_baseInd)); }
40template<
class T_Key,
class T_Value>
47template<
class T_Key,
class T_Value>
57template<
class T,
bool>
59template<
class T_Data,
class T_Dep>
65 using type = std::add_const_t<T>;
84 std::array<unsigned,5>
m_count{};
static_assert(LL_VERBOSE+1 == 5);
88 virtual void println(
const std::string &line) = 0;
104 void println(
const std::string &line)
override;
110template<
class T_Key,
class T_Value,
class T_ValueOrSize,
class T_Traits>
114 static_assert(std::numeric_limits<T_ValueOrSize>::is_signed &&
sizeof(T_Value) <=
sizeof(T_ValueOrSize),
115 "T_Value/T_ValueOrSize criteria");
120 auto end = k2v.
m_table - valOrSz;
121 auto found = std::lower_bound(k2v.
m_table, end, key,
125 if (found != end && found->m_key == key)
126 return found->m_value;
131 const auto ind = k2v.
m_conv(T_Key(key));
133 return T_Traits::map(valOrSz, ind);
135 return T_Traits::valueError();
150template<
class T_Data,
class T_Lex,
template<
class>
class C_Ptr>
156template<
class T_Data,
class T_Lex,
template<
class>
class C_Ptr>
162template<
class T_Data,
class T_Lex,
template<
class>
class C_Ptr>
171template<
class T_Data,
class T_Lex,
template<
class>
class C_Ptr>
177template<
class T_Lex,
template<
class>
class C_Ptr>
181 return t.
value<
int>();
std::array< unsigned, 5 > m_count
virtual void println(const std::string &line)=0
void log(E_LogLevel ll, const C_SourcePos &pos, std::string_view message)
auto getCount(E_LogLevel ll) const
virtual std::string toStr(const C_SourcePos &pos) const
C_ParserOStreamCount(std::ostream &out)
auto & operator()(size_t n)
FC_GetRelLexT(const F_GetProducedT< T, C_Ptr > &from, int baseInd)
THE common namespace of bux library.
int toInt(const C_LexInfoT< T_Lex, C_Ptr > &lex)
std::function< C_LexInfoT< T, C_Ptr > &(size_t)> F_GetProducedT
auto & unlex(I_LexAttr &lex)
T_CoConst< T_Data, T_Lex > * tryUnlex(const C_Ptr< T_Lex > &lex)
typename T_CoConst_< T_Data, std::is_const< T_Dep >::value >::type T_CoConst
T_Value index2value(U_K2V< T_Key, T_Value > k2v, T_ValueOrSize valOrSz, T_LexID key)
Render any copyable "type" token attribute on the fly.
std::add_const_t< T > type
const C_KVPair< T_Key, T_Value > * m_table
constexpr U_K2V(int(*conv)(T_Key))
constexpr U_K2V(const C_KVPair< T_Key, T_Value > *table)