15 std::ostringstream
os;
22 #define DEFINE(Type) \ 23 void signature_printer::visit(const Type& t) 27 os_ << t.get_type() <<
'<';
29 for (
auto c: t.get_content())
42 t.get_labelset()->accept(*this); 44 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 auto v = t.get_sets(); 65 for (unsigned int i = 0; i < v.size() - 1; ++i) 70 v[v.size() - 1]->accept(*this); 76 os_ << "nullableset<"; 77 t.get_labelset()->accept(*this); 89 os_ << t.letter_type(); 91 os_ << t.generators(); 97 t.genset()->accept(*this); 103 os_ << "expansionset<"; 104 t.get_expressionset()->accept(*this); 108 DEFINE(expressionset) 110 os_ << "expressionset<"; 111 t.get_context()->accept(*this); 114 os_ << '(
' << t.get_identities() << ')
'; 125 t.genset()->accept(*this); 134 DEFINE(polynomialset) 136 os_ << "polynomialset<"; 137 t.get_content()->accept(*this); std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
std::string normalize_context(const std::string &ctx, bool full)
A context, normalized.
std::shared_ptr< ast_node > parse_context(const std::string &ctx)
Parse a context, and return its AST.