Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
driver.hh
Go to the documentation of this file.
1 #ifndef LIB_VCSN_RAT_DRIVER_HH
2 # define LIB_VCSN_RAT_DRIVER_HH
3 
4 # include <vcsn/core/rat/fwd.hh>
5 # include <vcsn/dyn/ratexp.hh>
6 # include <vcsn/dyn/ratexpset.hh>
7 # include <lib/vcsn/rat/location.hh>
8 # include <vcsn/misc/export.hh>
9 
10 # include <lib/vcsn/rat/fwd.hh>
11 # include <lib/vcsn/rat/parse.hh>
12 
13 namespace vcsn
14 {
15  namespace rat
16  {
17 
20  {
21  public:
22  driver(const dyn::ratexpset& rs);
23  ~driver();
25  void ratexpset(const dyn::ratexpset& rs);
27  void context(const std::string& ctx);
28 
30  dyn::ratexp parse(std::istream& is, const location& l = location{});
31 
33  void error(const location& l, const std::string& m);
35  void invalid(const location& l, const std::string& s);
36 
38  std::string errors;
40  std::unique_ptr<yyFlexLexer> scanner_;
41 
42  private:
47  friend class parser;
48  };
49 
50  }
51 }
52 #endif // !LIB_VCSN_RAT_DRIVER_HH
A Bison parser.
Definition: parse.hh:292
Define the vcsn::rat::parser class.
std::shared_ptr< detail::ratexp_base > ratexp
Definition: fwd.hh:64
location location_
The inital location.
Definition: driver.hh:44
vcsn::rat::exp_t result_
Definition: driver.hh:46
State and public interface for rational expression parsing.
Definition: driver.hh:19
std::shared_ptr< const detail::ratexpset_base > ratexpset
Definition: fwd.hh:73
std::istringstream is
The input stream: the specification to translate.
Definition: translate.cc:329
Abstract a location.
Definition: location.hh:47
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
Definition: driver.hh:40
Define the vcsn::rat::location class.
std::shared_ptr< const exp > exp_t
Definition: fwd.hh:16
std::shared_ptr< const detail::context_base > context
Definition: context.hh:71
#define LIBVCSN_API
Definition: export.hh:9
dyn::ratexpset ratexpset_
Definition: driver.hh:45
variadic_mul_mixin< rat::ratexpset_impl< Context >> ratexpset
Definition: fwd.hh:166
std::string errors
The error messages.
Definition: driver.hh:38