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_DOT_DRIVER_HH
2 # define LIB_VCSN_DOT_DRIVER_HH
3 
4 # include <vcsn/core/fwd.hh>
5 # include <vcsn/core/rat/fwd.hh>
7 # include <vcsn/misc/export.hh>
8 
9 # include <lib/vcsn/dot/fwd.hh>
10 # include <lib/vcsn/rat/location.hh>
11 
12 namespace vcsn
13 {
14  namespace detail
15  {
16  namespace dot
17  {
19 
22  {
23  public:
24  driver();
25  ~driver();
26 
28  dyn::automaton parse(std::istream& is,
29  const location_t& l = location_t{});
30 
32  void error(const location_t& l, const std::string& m);
34  void invalid(const location_t& l, const std::string& s);
35 
37  std::string errors;
39  std::unique_ptr<yyFlexLexer> scanner_;
40 
41  private:
44  void setup_(const location_t& l, const std::string& ctx);
45 
49  std::shared_ptr<vcsn::automaton_editor> edit_;
50  friend class parser;
51  };
52  }
53  }
54 }
55 #endif // !LIB_VCSN_DOT_DRIVER_HH
std::shared_ptr< detail::automaton_base > automaton
Definition: automaton.hh:71
State and public interface for Dot parsing.
Definition: driver.hh:21
location_t location_
The inital location.
Definition: driver.hh:47
std::string errors
The error messages.
Definition: driver.hh:37
vcsn::rat::location location
Definition: scan.hh:18
A Bison parser.
Definition: parse.hh:306
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
Definition: driver.hh:39
std::istringstream is
The input stream: the specification to translate.
Definition: translate.cc:329
Abstract a location.
Definition: location.hh:47
Define the vcsn::rat::location class.
#define LIBVCSN_API
Definition: export.hh:9
std::shared_ptr< vcsn::automaton_editor > edit_
An automaton editor that stores the one being built.
Definition: driver.hh:49
std::ostream & dot(const Aut &aut, std::ostream &out, bool dot2tex=false)
Definition: dot.hh:344