22 : scanner_{std::make_unique<yyFlexLexer>()}
40 auto status = p.
parse();
46 "no vcsn_context defined");
47 res =
edit_->result();
62 edit_->set_separator(
',');
64 catch (std::runtime_error& e)
78 "no vcsn_context defined");
86 std::ostringstream er;
89 if (!!getenv(
"YYDEBUG"))
90 std::cerr <<
"ERROR: " << er.str() << std::endl;
bool require_context_done_
location_t location_
The inital location.
context make_context(const std::string &name)
Build a context from its name.
std::string errors
The error messages.
void error(const location_t &l, const std::string &m)
Report an error m at l.
Syntax errors thrown from user actions.
ATTRIBUTE_NORETURN void invalid(const location_t &l, const std::string &s)
The string s is invalid at l.
std::shared_ptr< vcsn::automaton_editor > edit_
An automaton editor that stores the one being built.
dyn::automaton parse(std::istream &is, const location_t &l=location_t{})
Parse this stream.
void print_caret(std::istream &is, std::ostream &os, const rat::location &loc)
Repeat a line with an error, underlining the error with carets.
std::ostream & dot(const Aut &aut, std::ostream &out=std::cout, format fmt={}, bool mathjax=false)
Print an automaton in Graphviz's Dot format.
bool has_edit_(const location_t &l)
Require that vcsn_context was defined.
void setup_(const location_t &l, const std::string &ctx)
From context_, build edit_.
void set_debug_level(debug_level_type l)
Set the current debugging level.
Define the vcsn::detail::dot::parser class.
void require(Bool b, Args &&... args)
If b is not verified, raise an error with args as message.
virtual int parse()
Parse.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
automaton_editor * make_automaton_editor(const context &ctx)
Build an automaton editor from its context.