19 template <
typename Ctx>
23 std::istringstream
is{name};
24 auto res = Ctx::make(
is);
33 raise(__func__,
": invalid context name: ",
str_escape(name),
43 template <
typename Ctx>
62 template <Automaton Aut>
66 const auto& a = aut->as<Aut>();
71 template <
typename ExpSet>
80 template <
typename ExpansionSet>
100 template <
typename Ctx1,
typename Ctx2>
120 template <
typename Ctx>
124 const auto& c = ctx->as<Ctx>();
135 template <
typename Ctx>
138 -> std::enable_if_t<Ctx::is_lat, size_t>
143 template <
typename Ctx>
146 -> std::enable_if_t<!Ctx::is_lat, size_t>
156 template <
typename Ctx>
weightset_mixin< rat::expressionset_impl< Context >> expressionset
context context_of(const automaton &aut)
Bridge.
std::ostream & str_escape(std::ostream &os, const std::string &str, const char *special=nullptr)
Output a string, escaping special characters.
std::shared_ptr< const detail::expansion_base > expansion
size_t num_tapes(const context &ctx)
Bridge.
context context_of_expression(const expression &exp)
Bridge (context_of).
context context_of_expansion(const expansion &exp)
Bridge (context_of).
constexpr auto num_tapes(const Ctx &) -> std::enable_if_t< Ctx::is_lat, size_t >
context make_context(const std::string &name)
Bridge.
word_context_t< context< LabelSet, WeightSet > > make_word_context(const context< LabelSet, WeightSet > &ctx)
The wordset context of a context.
rat::expansionset< ExpSet > expansionset
std::shared_ptr< const detail::context_base > context
A dyn::context.
std::shared_ptr< detail::automaton_base > automaton
std::istringstream is
The input stream: the specification to translate.
context make_context(const std::string &name)
Build a context from its name.
static dyn::context ctx(const driver &d)
Get the context of the driver.
std::shared_ptr< detail::expression_base > expression
context join(const context &c1, const context &c2)
Bridge.
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
context make_word_context(const context &ctx)
Bridge.
Ctx make_context(const std::string &name)