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