38 std::ostringstream er;
40 if (!!getenv(
"YYDEBUG"))
41 std::cerr << er.str() << std::endl;
48 error(l,
"invalid input: " + s);
57 if (
const char* cp = getenv(
"YYDEBUG"))
60 std::istringstream s{cp};
70 scanner_->scan_open_(
is);
78 static int nesting = 0;
83 scanner_->scan_close_();
89 res = ratexpset_->make_ratexp(result_);
context make_context(const std::string &name)
Build a context from its name.
void set_debug_level(debug_level_type l)
Set the current debugging level.
static int debug_level()
Debug level set in the user's environment.
ratexpset make_ratexpset(const context &ctx,::vcsn::rat::identities is)
Build an ratexpset from its context.
dyn::ratexp parse(std::istream &is, const location &l=location{})
Parse this stream.
void error(const location &l, const std::string &m)
Report an error m at l.
Define the vcsn::rat::parser class.
driver(const dyn::ratexpset &rs)
std::shared_ptr< detail::ratexp_base > ratexp
void context(const std::string &ctx)
Set the ratexpset to use from its context name.
static int debug_level_()
The nesting limit for parser traces, as specified per $YYDEBUG.
std::shared_ptr< const detail::ratexpset_base > ratexpset
void ratexpset(const dyn::ratexpset &rs)
Set the ratexpset to use.
virtual int parse()
Parse.
std::istringstream is
The input stream: the specification to translate.
void invalid(const location &l, const std::string &s)
The string s is invalid at l.
dyn::ratexpset ratexpset_
identities
A ratexpset can implement several different sets of identities on expressions.
std::string errors
The error messages.