18 template <
typename Ctx>
22 std::istringstream
is{name};
23 auto res = Ctx::make(
is);
32 raise(__func__,
": invalid context name: ",
str_escape(name),
42 template <
typename Ctx>
61 template <
typename Aut>
65 const auto& a = aut->as<Aut>();
70 template <
typename ExpSet>
90 template <
typename Ctx1,
typename Ctx2>
110 template <
typename Ctx>
114 const auto& c = ctx->as<Ctx>();
125 template <
typename Ctx>
133 template <
typename Ctx>
136 -> enable_if_t<!Ctx::is_lat, size_t>
146 template <
typename Ctx>
std::ostream & str_escape(std::ostream &os, const std::string &str)
Output a string, escaping special characters.
std::shared_ptr< const detail::context_base > context
A dyn::context.
size_t num_tapes(const context &ctx)
Bridge.
word_context_t< context< LabelSet, WeightSet > > make_word_context(const context< LabelSet, WeightSet > &ctx)
The wordset context of a context.
context make_context(const std::string &name)
Bridge.
std::istringstream is
The input stream: the specification to translate.
context context_of(const automaton &aut)
Bridge.
typename std::enable_if< Cond, T >::type enable_if_t
context make_word_context(const context &ctx)
Bridge.
static dyn::context ctx(const driver &d)
Get the context of the driver.
std::shared_ptr< detail::automaton_base > automaton
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
constexpr auto num_tapes(const Ctx &) -> enable_if_t< Ctx::is_lat, size_t >
weightset_mixin< rat::expressionset_impl< Context >> expressionset
context make_context(const std::string &name)
Build a context from its name.
Ctx make_context(const std::string &name)
context context_of_expression(const expression &exp)
Bridge (context_of).
std::shared_ptr< detail::expression_base > expression
context join(const context &c1, const context &c2)
Bridge.