Vcsn  2.2
Be Rational
driver.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vcsn/core/fwd.hh>
4 #include <vcsn/core/rat/fwd.hh>
6 #include <vcsn/misc/export.hh>
7 
8 #include <lib/vcsn/dot/fwd.hh>
10 
11 namespace vcsn
12 {
13  namespace detail
14  {
15  namespace dot
16  {
18 
21  {
22  public:
23  driver();
24  ~driver();
25 
27  dyn::automaton parse(std::istream& is,
28  const location_t& l = location_t{});
29 
31  void error(const location_t& l, const std::string& m);
33  void invalid(const location_t& l, const std::string& s);
34 
36  std::string errors;
38  std::unique_ptr<yyFlexLexer> scanner_;
39 
40  private:
43  void setup_(const location_t& l, const std::string& ctx);
44 
48  std::shared_ptr<vcsn::automaton_editor> edit_;
49  friend class parser;
50  };
51  }
52  }
53 }
Definition: a-star.hh:8
Define the vcsn::rat::location class.
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
Definition: driver.hh:38
Abstract a location.
Definition: location.hh:47
#define LIBVCSN_API
Definition: export.hh:8
location_t location_
The inital location.
Definition: driver.hh:46
std::shared_ptr< detail::automaton_base > automaton
Definition: automaton.hh:69
std::istringstream is
The input stream: the specification to translate.
Definition: translate.cc:380
static dyn::context ctx(const driver &d)
Get the context of the driver.
Definition: parse.cc:82
std::shared_ptr< vcsn::automaton_editor > edit_
An automaton editor that stores the one being built.
Definition: driver.hh:48
A Bison parser.
Definition: parse.hh:305
std::string errors
The error messages.
Definition: driver.hh:36
vcsn::rat::location location
Definition: scan.hh:17
std::ostream & dot(const Aut &aut, std::ostream &out, format fmt={})
Print an automaton in Graphviz's Dot format.
Definition: dot.hh:377
State and public interface for Dot parsing.
Definition: driver.hh:20