14 std::ostringstream
os;
16 std::istringstream
is;
19 auto ast = parser.
parse();
24 #define DEFINE(Type) \
25 void signature_printer::visit(const Type& t)
29 os_ << t.get_type() <<
'<';
31 for (
auto c: t.get_content())
43 t.get_labelset()->accept(*this);
45 t.get_weightset()->accept(*this);
51 auto v = t.get_sets();
52 for (unsigned int i = 0; i < v.size() - 1; ++i)
57 v[v.size() - 1]->accept(*this);
64 t.get_labelset()->accept(*this);
76 os_ << t.letter_type();
78 os_ << t.generators();
84 t.genset()->accept(*this);
91 t.get_context()->accept(*this);
94 os_ << '(
' << t.get_identities() << ')
';
105 t.genset()->accept(*this);
114 DEFINE(polynomialset)
116 os_ << "polynomialset<";
117 t.get_content()->accept(*this);
std::shared_ptr< ast_node > parse()
Accept anything.
std::istringstream is
The input stream: the specification to translate.
std::string normalize(const std::string &sig)
The signature, normalized.
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.