54 template <
typename... Args>
57 return value_t{std::forward<Args>(args)...};
150 template <
typename LabelSet>
153 typename LabelSet::value_t
v)
const
156 *
this,
": conv: invalid label: ",
to_string(ls, v));
163 if (i.peek() ==
'\\')
168 *
this,
": invalid label: unexpected \\", c);
174 template <
typename Fun>
175 void convs(std::istream&, Fun)
const
177 raise(*
this,
": ranges not implemented");
186 o <<
"\\{\\varepsilon\\}";
static bool less(const value_t l, const value_t r)
Whether l < r.
value_t conv(const LabelSet &ls, typename LabelSet::value_t v) const
Convert from labelset to oneset.
static value_t mul(value_t l, value_t r)
static bool is_special(const value_t v)
The special label is indistinguishable for the others.
static type join(const oneset &, const oneset &)
void convs(std::istream &, Fun) const
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
value_t value(Args &&...args) const
Value constructor.
A structure that implements the computation of join(V1, V2).
Print as a parsable type string.
static bool is_one(const value_t v)
value_t conv(std::istream &i, bool=true) const
static bool equal(const value_t l, const value_t r)
Whether l == r.
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
static type value(oneset)
Implementation of labels are ones: there is a single instance of label.
static std::ostream & print(const value_t, std::ostream &o=std::cout, format={})
static constexpr bool is_letterized()
static value_t transpose(const value_t v)
The smallest nullableset which includes LabelSet.
static value_t conv(self_t, value_t v)
static constexpr bool is_free()
#define VCSN_REQUIRE(Cond,...)
A macro similar to require.
An input/output format for valuesets.
auto meet(const expressionset< Ctx1 > &a, const expressionset< Ctx2 > &b) -> expressionset< meet_t< Ctx1, Ctx2 >>
The meet of two expressionsets.
static constexpr bool has_one()
static void make(std::istream &is)
static constexpr bool is_expressionset()
static size_t hash(value_t v)
Print as is. For instance, don't try to escape labels.
std::string to_string(direction d)
Conversion to string.
std::ostream & print_set(std::ostream &o, format fmt={}) const
Print as rich UTF-8 text, escaped.
static bool is_letter(const value_t)
static oneset make(std::istream &is)
Build from the description in is.
static size_t size(value_t)
bool open(bool o) const
Does not make a lot of sense.
Provide a variadic mul on top of a binary mul(), and one().
Print as plain (ASCII) text, escaped.
static type value(oneset)
weightset_mixin< detail::r_impl > r