14 std::ostringstream
os;
16 std::istringstream
is;
24 #define DEFINE(Type) \
25 void signature_printer::visit(const Type& t)
29 os_ << t.get_type() <<
'<';
31 for (
auto c: t.get_content())
44 t.get_labelset()->accept(*this);
46 t.get_weightset()->accept(*this);
53 auto v = t.get_sets();
54 for (unsigned int i = 0; i < v.size() - 1; ++i)
59 v[v.size() - 1]->accept(*this);
66 auto v = t.get_sets();
67 for (unsigned int i = 0; i < v.size() - 1; ++i)
72 v[v.size() - 1]->accept(*this);
78 os_ << "nullableset<";
79 t.get_labelset()->accept(*this);
91 os_ << t.letter_type();
93 os_ << t.generators();
99 t.genset()->accept(*this);
105 os_ << "expansionset<";
106 t.get_expressionset()->accept(*this);
110 DEFINE(expressionset)
112 os_ << "expressionset<";
113 t.get_context()->accept(*this);
116 os_ << '(
' << t.get_identities() << ')
';
127 t.genset()->accept(*this);
136 DEFINE(polynomialset)
138 os_ << "polynomialset<";
139 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=true)
A context, normalized.
std::shared_ptr< ast_node > parse_context()
Accept only a valid context.
std::istringstream is
The input stream: the specification to translate.
static dyn::context ctx(const driver &d)
Get the context of the driver.