1 #ifndef VCSN_DYN_RATEXPSET_HH
2 # define VCSN_DYN_RATEXPSET_HH
33 virtual std::string
vname(
bool full =
true)
const = 0;
36 template <
typename RatExpSet>
43 template <
typename RatExpSet>
53 virtual value_t atom(
const std::string& w)
const = 0;
87 bool accept =
true)
const = 0;
94 virtual std::ostream&
print(
const value_t v, std::ostream& o)
const = 0;
98 template <
typename RatExpSet>
113 virtual std::string
vname(
bool full =
true)
const override
125 typename ratexpset_t::value_t
down(
const value_t& v)
const;
141 virtual value_t atom(
const std::string& w)
const override;
168 bool accept =
true)
const override;
173 virtual std::ostream&
print(
value_t v, std::ostream& o)
const override;
177 template <
typename LabelSet_,
typename Bool>
179 bool accept, std::true_type, Bool)
const;
181 template <
typename LabelSet_>
183 bool accept, std::false_type,
184 std::false_type)
const;
186 template <
typename LabelSet_>
188 bool accept, std::false_type,
189 std::true_type)
const;
196 template <
typename RatExpSet>
204 #endif // !VCSN_DYN_RATEXPSET_HH
virtual value_t one() const =0
virtual value_t add(value_t l, value_t r) const =0
label_t_of< context_t > label_t
virtual std::ostream & print(const value_t v, std::ostream &o) const =0
virtual value_t lmul(const std::string &w, value_t v) const override
Left-multiplication by a weight.
virtual value_t transposition(value_t e) const =0
Add a transposition operator.
ratexpset make_ratexpset(const context &ctx,::vcsn::rat::identities is)
Build an ratexpset from its context.
Wrapper around a ratexpset.
virtual value_t complement(value_t v) const override
Add a complement operator.
const ratexpset_wrapper< RatExpSet > & as() const
Extract wrapped typed ratexp.
virtual value_t one() const override
virtual rat::identities identities() const override
virtual value_t rmul(value_t e, const std::string &w) const =0
Right-multiplication by a weight.
virtual value_t atom(const std::string &w) const =0
virtual value_t letter_class(const letter_class_t &chars, bool accept=true) const override
A ratexp matching one character amongst chars.
std::shared_ptr< detail::ratexp_base > ratexp
virtual value_t zero() const override
virtual std::string vname(bool full=true) const =0
A description of the ratexp type.
virtual std::string vname(bool full=true) const override
A description of the ratexp type.
virtual value_t concat(value_t l, value_t r) const =0
Implicit product.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
ratexpset_t::value_t down(const value_t &v) const
From weak to strong typing.
virtual rat::identities identities() const =0
virtual value_t atom(const std::string &w) const override
virtual dyn::ratexp make_ratexp(const value_t &v) const =0
virtual value_t conv(std::istream &s) const =0
Parsing.
const ratexpset_t & ratexpset() const
The ratexpset which this wraps.
virtual value_t rmul(value_t v, const std::string &w) const override
Right-multiplication by a weight.
virtual value_t mul(value_t l, value_t r) const override
Explicit product.
virtual value_t star(value_t v) const override
virtual value_t conjunction(value_t l, value_t r) const =0
typename detail::label_t_of_impl< base_t< ValueSet >>::type label_t_of
virtual value_t complement(value_t e) const =0
Add a complement operator.
std::shared_ptr< const detail::ratexpset_base > ratexpset
ratexpset_wrapper(const ratexpset_t &rs)
Constructor.
virtual value_t ldiv(value_t l, value_t r) const override
std::istringstream is
The input stream: the specification to translate.
typename super_t::value_t value_t
virtual value_t letter_class(const letter_class_t &chars, bool accept=true) const =0
A ratexp matching one character amongst chars.
weight_t_of< context_t > weight_t
virtual value_t mul(value_t l, value_t r) const =0
Explicit product.
Provide a variadic mul on top of a binary mul(), and one().
std::shared_ptr< const exp > exp_t
typename detail::weight_t_of_impl< base_t< ValueSet >>::type weight_t_of
Abstract wrapper around a (typeful) ratexpset.
context_t_of< ratexpset_t > context_t
virtual value_t lmul(const std::string &w, value_t e) const =0
Left-multiplication by a weight.
virtual value_t transposition(value_t v) const override
Add a transposition operator.
virtual value_t shuffle(value_t l, value_t r) const override
virtual value_t shuffle(value_t l, value_t r) const =0
virtual value_t ldiv(value_t l, value_t r) const =0
virtual value_t zero() const =0
virtual value_t conv(std::istream &is) const override
Parsing.
std::set< std::pair< std::string, std::string >> letter_class_t
virtual value_t conjunction(value_t l, value_t r) const override
virtual value_t star(value_t e) const =0
virtual value_t rdiv(value_t l, value_t r) const override
identities
A ratexpset can implement several different sets of identities on expressions.
virtual value_t concat(value_t l, value_t r) const override
When concatenating two atoms, possibly make a single one, or make the product.
virtual dyn::ratexp make_ratexp(const value_t &v) const override
virtual value_t add(value_t l, value_t r) const override
value_t letter_class_(const letter_class_t &chars, bool accept, std::true_type, Bool) const
If context is oneset.
ratexpset_wrapper< RatExpSet > & as()
Extract wrapped typed ratexpset.
virtual value_t rdiv(value_t l, value_t r) const =0
virtual std::ostream & print(value_t v, std::ostream &o) const override