Vcsn  2.1
Be Rational
signature-printer.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <ostream>
4 
5 #include <vcsn/dyn/type-ast.hh>
6 
7 namespace vcsn
8 {
9  namespace ast
10  {
12  {
13  public:
14  signature_printer(std::ostream& os, bool full)
15  : os_(os), full_(full)
16  {}
17 
18 #define DEFINE(Type) \
19  virtual void visit(const Type& t)
20 
22  DEFINE(context);
23  DEFINE(expansionset);
25  DEFINE(genset);
26  DEFINE(letterset);
27  DEFINE(nullableset);
28  DEFINE(oneset);
29  DEFINE(other);
31  DEFINE(tuple);
33  DEFINE(weightset);
34  DEFINE(wordset);
35 
36 #undef DEFINE
37 
38  private:
39  std::ostream& os_;
40  bool full_;
41  };
42 
51  std::string normalize_context(const std::string& ctx, bool full = true);
52  }
53 }
std::shared_ptr< const detail::context_base > context
A dyn::context.
Definition: fwd.hh:41
std::string normalize_context(const std::string &ctx, bool full=true)
A context, normalized.
#define DEFINE(Type)
static dyn::context ctx(const driver &d)
Get the context of the driver.
Definition: parse.cc:80
std::shared_ptr< detail::automaton_base > automaton
Definition: automaton.hh:69
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
Definition: translate.cc:374
weightset_mixin< rat::expressionset_impl< Context >> expressionset
Definition: fwd.hh:200
signature_printer(std::ostream &os, bool full)
weightset_mixin< detail::tupleset_impl< LabelSets...>> tupleset
Definition: fwd.hh:27
weightset_mixin< detail::polynomialset_impl< Context, Kind >> polynomialset
Definition: fwd.hh:63