Vcsn  2.5
Be Rational
driver.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <lib/vcsn/dot/fwd.hh>
5 #include <vcsn/core/fwd.hh>
6 #include <vcsn/core/rat/fwd.hh>
7 #include <vcsn/misc/export.hh>
8 #include <vcsn/misc/location.hh>
9 
10 namespace vcsn
11 {
12  namespace detail
13  {
14  namespace dot
15  {
17 
20  {
21  public:
22  driver();
23  ~driver();
24 
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 
48  bool has_edit_(const location_t& l);
49  bool require_context_done_ = false;
50 
54  std::shared_ptr<vcsn::automaton_editor> edit_;
55  friend class parser;
56  };
57  }
58  }
59 }
Definition: a-star.hh:8
location_t location_
The inital location.
Definition: driver.hh:52
vcsn::rat::location location
Pairs of positions in a file/stream.
Definition: fwd.hh:36
std::ostream & dot(const Aut &aut, std::ostream &out=std::cout, format fmt={}, bool mathjax=false)
Print an automaton in Graphviz&#39;s Dot format.
Definition: dot.hh:435
std::shared_ptr< vcsn::automaton_editor > edit_
An automaton editor that stores the one being built.
Definition: driver.hh:54
#define LIBVCSN_API
Definition: export.hh:8
A Bison parser.
Definition: parse.hh:305
Abstract a location.
Definition: location.hh:47
A dyn automaton.
Definition: automaton.hh:17
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
Definition: driver.hh:39
State and public interface for Dot parsing.
Definition: driver.hh:19
std::string errors
The error messages.
Definition: driver.hh:37