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