Vcsn  2.2a
Be Rational
read.cc
Go to the documentation of this file.
1 #include <lib/vcsn/rat/read.hh>
2 #include <vcsn/dyn/context.hh>
3 #include <vcsn/dyn/expression.hh>
4 #include <lib/vcsn/rat/driver.hh>
5 
6 namespace vcsn
7 {
8  namespace rat
9  {
12  std::istream& is, const location& l)
13  {
14  vcsn::rat::driver d{ctx, ids};
15  auto res = d.parse(is, l);
16  if (!d.errors.empty())
17  throw std::runtime_error(d.errors);
18  return res;
19  }
20  }
21 }
std::istringstream is
The input stream: the specification to translate.
Definition: translate.cc:380
Abstract a location.
Definition: location.hh:47
State and public interface for rational expression parsing.
Definition: driver.hh:17
std::shared_ptr< const detail::context_base > context
A dyn::context.
Definition: fwd.hh:26
dyn::expression read(const dyn::context &ctx, rat::identities ids, std::istream &is, const location &l)
The expression in stream is.
Definition: read.cc:11
static identities ids(const driver &d)
Get the identities of the driver.
Definition: parse.cc:89
static dyn::context ctx(const driver &d)
Get the context of the driver.
Definition: parse.cc:82
std::shared_ptr< detail::expression_base > expression
Definition: expression.hh:92
An expressionset can implement several different sets of identities on expressions.
Definition: identities.hh:21
Definition: a-star.hh:8