6 #include <boost/optional.hpp>
7 #include <boost/range/algorithm/for_each.hpp>
18 template <
typename GenSet>
25 using word_t =
typename genset_t::word_t;
63 template <
typename Fun>
65 convs_(std::istream& i, Fun fun)
const
82 "invalid label: unexpected ",
str_escape(res));
87 # define DEFINE(Name, Attribute) \
88 template <typename... Args> \
91 Name(Args&&... args) const \
92 -> decltype(this->genset()->Name(std::forward<Args>(args)...)) \
94 return this->genset()->Name(std::forward<Args>(args)...); \
This class has no modeling purpose, it only serves to factor code common to letterset and wordset...
#define VCSN_REQUIRE(Cond,...)
A macro similar to require.
typename genset_t::letters_t letters_t
genset_ptr genset() const
const genset_t & generators() const
std::ostream & str_escape(std::ostream &os, const std::string &str, const char *special=nullptr)
Output a string, escaping special characters.
ATTRIBUTE_PURE auto transpose(Args &&...args) const -> decltype(this->genset() -> transpose(std::forward< Args >(args)...))
char eat(std::istream &is, char c)
Check lookahead character and advance.
genset_labelset(const genset_t &gs={})
auto delimit(Args &&...args) const -> decltype(this->genset() -> delimit(std::forward< Args >(args)...))
genset_labelset(const genset_ptr &gs)
letter_t get_letter(std::istream &i, bool quoted=true) const
Read one letter from i.
ATTRIBUTE_PURE auto is_letter(Args &&...args) const -> decltype(this->genset() -> is_letter(std::forward< Args >(args)...))
ATTRIBUTE_PURE auto equal(Args &&...args) const -> decltype(this->genset() -> equal(std::forward< Args >(args)...))
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
auto mul(Args &&...args) const -> decltype(this->genset() -> mul(std::forward< Args >(args)...))
auto get_word(Args &&...args) const -> decltype(this->genset() -> get_word(std::forward< Args >(args)...))
auto undelimit(Args &&...args) const -> decltype(this->genset() -> undelimit(std::forward< Args >(args)...))
auto end(Args &&...args) const -> decltype(this->genset() -> end(std::forward< Args >(args)...))
typename genset_t::letter_t letter_t
auto begin(Args &&...args) const -> decltype(this->genset() -> begin(std::forward< Args >(args)...))
#define DEFINE(Name, Attribute)
Use the implementation from genset.
void convs_(std::istream &i, Fun fun) const
Read and process a class of letters.
typename genset_t::word_t word_t
std::shared_ptr< const genset_t > genset_ptr
Functor to compare Values of ValueSets.
ATTRIBUTE_PURE auto has(Args &&...args) const -> decltype(this->genset() -> has(std::forward< Args >(args)...))
LabelSet::letters_t conv_label_class_(const LabelSet &ls, std::istream &i)
Read a set of letters (hence, guaranteed in order, and unique).