Vcsn  2.8
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  ATTRIBUTE_NORETURN
35  void invalid(const location_t& l, const std::string& s);
36 
38  std::string errors;
40  std::unique_ptr<yyFlexLexer> scanner_;
41 
42  private:
45  void setup_(const location_t& l, const std::string& ctx);
46 
49  bool has_edit_(const location_t& l);
50  bool require_context_done_ = false;
51 
55  std::shared_ptr<vcsn::automaton_editor> edit_;
56  friend class parser;
57  };
58  }
59  }
60 }
A dyn automaton.
Definition: automaton.hh:17
A Bison parser.
Definition: parse.hh:305
location_t location_
The inital location.
Definition: driver.hh:53
#define LIBVCSN_API
Definition: export.hh:8
std::string errors
The error messages.
Definition: driver.hh:38
std::shared_ptr< vcsn::automaton_editor > edit_
An automaton editor that stores the one being built.
Definition: driver.hh:55
Abstract a location.
Definition: location.hh:47
vcsn::rat::location location
Pairs of positions in a file/stream.
Definition: fwd.hh:36
State and public interface for Dot parsing.
Definition: driver.hh:19
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
Definition: a-star.hh:8
std::unique_ptr< yyFlexLexer > scanner_
The scanner.
Definition: driver.hh:40