9 #include <vcsn/dyn/registries.hh>
27 auto res = d.
parse(is);
45 = std::map<std::string, std::function<automaton(std::istream&)>>
47 {
"default", read_dot},
52 auto read =
getargs(
"automaton input format", map, f);
54 return strip_p ?
strip(res) : res;
63 std::istream& is,
const std::string& f)
69 static const auto map = std::map<std::string, fmt>
74 switch (
getargs(
"expression input format", map, f))
96 static const auto map = std::map<std::string, fmt>
103 bool is_quoted =
format == quoted;
104 return detail::read_label_registry().call(ctx, is, is_quoted);
automaton read_fado(std::istream &is)
std::shared_ptr< const detail::label_base > label
automaton strip(const automaton &a)
The automaton in a with its metadata layers removed.
std::shared_ptr< const detail::context_base > context
A dyn::context.
expression read_expression(const context &ctx, rat::identities ids, std::istream &is, const std::string &format="default")
Read an expression from a stream.
C::mapped_type getargs(const std::string &kind, const C &map, const std::string &key)
Find a correspondance in a map.
std::istringstream is
The input stream: the specification to translate.
std::ostream & fado(const Aut &aut, std::ostream &out)
std::string errors
The error messages.
static dyn::context ctx(const driver &d)
Get the context of the driver.
std::shared_ptr< detail::automaton_base > automaton
static identities ids(const driver &d)
Get the identities of the driver.
label read_label(const context &ctx, std::istream &is, const std::string &format="default")
Read a label from a stream.
An expressionset can implement several different sets of identities on expressions.
State and public interface for Dot parsing.
dyn::automaton parse(std::istream &is, const location_t &l=location_t{})
Parse this stream.
std::ostream & efsm(const Aut &aut, std::ostream &out)
Format automaton to EFSM format, based on FSM format.
std::ostream & dot(const Aut &aut, std::ostream &out, bool dot2tex=false)
dyn::expression read(const dyn::context &ctx, rat::identities ids, std::istream &is, const location &l)
The expression in stream is.
std::shared_ptr< detail::expression_base > expression
automaton read_automaton(std::istream &is, const std::string &format="default", bool strip=true)
Read an automaton from a stream.
#define BUILTIN_UNREACHABLE()
automaton read_efsm(std::istream &is)