23 std::string file =
"file.fado";
37 if (kind !=
"@DFA" && kind !=
"@NFA")
38 raise(file,
": bad automaton kind: ", kind);
48 while ((c = is.get()) !=
'\n' && !is.eof())
49 if (c ==
' ' || c ==
'\t')
84 if (!init && !is.eof())
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
void add_initial(string_t s, string_t w=string_t{})
Add s as an initial state.
void add_transition(string_t src, string_t dst, string_t lbl, string_t w=string_t{})
Add an acceptor transition from src to dst, labeled by lbl.
void add_final(string_t s, string_t w=string_t{})
Add s as a final state.
bool open(bool o)
Whether unknown letters should be added, or rejected.
automaton read_fado(std::istream &is)
dyn::automaton result(const std::string &ctx={})
Return the built automaton.
Build an automaton with unknown context.