17 #define CASE(T) case type_t::T: o << #T; break
38 template <
typename ExpSet>
48 template <typename ExpSet> \
56 static bool print = !! getenv(
"VCSN_PRINT");
60 out_ << (rs_.identities().is_distributive()
61 ?
"{\\color{red}{" :
"{\\color{blue}{");
78 langle_ =
" \\left\\langle ";
79 rangle_ =
" \\right\\rangle ";
84 transposition_ =
"^{T}";
89 sum_ = (rs_.identities().is_distributive() ?
" \\oplus "
92 one_ =
"\\varepsilon";
95 ldiv_ =
" \\backslash ";
96 tuple_left =
" \\left. ";
97 tuple_middle =
" \\middle| ";
98 tuple_right =
" \\right. ";
110 transposition_ =
"{T}";
136 case exp::type_t::Type: \
137 return precedence_t::Type
158 #define VISIT(Type) \
159 DEFINE::visit(const Type ## _t& v) \
165 rs_.weightset()->print(
v.weight(), out_, fmt_.for_weights());
166 out_ << rangle_ << lmul_;
167 print_child_(*
v.sub(),
v);
172 print_child_(*
v.sub(),
v);
173 out_ << rmul_ << langle_;
174 rs_.weightset()->print(
v.weight(), out_, fmt_.for_weights());
192 rs_.labelset()->print(
v.value(), out_, fmt_.for_labels());
198 static bool force = !! getenv(
"VCSN_PARENS");
199 bool parent_has_precedence = precedence_(child) <= parent;
202 || (parent_has_precedence
204 && ! is_braced_(child)));
219 print_child(child, precedence_(parent));
222 template <
typename ExpSet>
223 template <type_t Type>
229 print_child_(*
v.sub(),
v);
233 template <
typename ExpSet>
234 template <type_t Type>
241 for (
const auto& i: n)
typename super_t::template unary_t< Type > unary_t
automaton conjunction_(const std::vector< automaton > &as, bool lazy, vcsn::detail::index_sequence< I...>)
Bridge helper.
type_t
The possible types of expressions.
automaton infiltration_(const std::vector< automaton > &as, vcsn::detail::index_sequence< I...>)
Variadic bridge helper.
int address(const void *t)
Name pointers, to make them easier to read.
void print_(const unary_t< Type > &n, const char *op)
Print a unary node.
typename super_t::template variadic_t< Type > variadic_t
std::ostream & incendl(std::ostream &o)
Increment the indentation, print an end of line, and set the indentation.
automaton shuffle_(const std::vector< automaton > &as, vcsn::detail::index_sequence< I...>)
Variadic bridge helper.
typename super_t::node_t node_t
Actual node, without indirection.
weight_node< type_t::rweight, Context > rweight
std::ostream & operator<<(std::ostream &o, type_t t)
std::ostream & print(const Aut &aut, std::ostream &out, const std::string &format)
Implementation of nodes of tuple of rational expressions.
precedence_t
The possible node precedence levels, increasing.
printer(const expressionset_t &rs, std::ostream &out)
A printer.
constant< type_t::zero, Context > zero
weight_node< type_t::lweight, Context > lweight
An inner node implementing a weight.
Indentation relative functions.
constant< type_t::one, Context > one
std::ostream & decendl(std::ostream &o)
Decrement the indentation, print an end of line, and set the indentation.
An inner node with multiple children.