21 #include <unordered_map>
65 static GFG makeGFG(
const std::string& grammar);
67 std::vector<std::unique_ptr<Node>>
nodes;
69 friend std::ostream&
operator<<(std::ostream& os,
const GFG& g);
std::unordered_map< std::string, int > name2NodeId
Definition: parser.h:72
static GFG makeGFG(const std::string &grammar)
std::ostream & operator<<(std::ostream &os, const Node &n)
Node & operator=(const Node &) const =delete
Node & addNode(const std::string &name)
int id
Definition: parser.h:51
Edge(const Node &s, const std::string &trans, const Node &t)
Definition: parser.h:32
friend std::ostream & operator<<(std::ostream &os, const GFG &g)
Edge & operator=(const Edge &) const =delete
std::vector< std::unique_ptr< Node > > nodes
Definition: parser.h:67
GFG()
Definition: parser.h:57
std::string name
Definition: parser.h:52
std::vector< Edge > outEdges
Definition: parser.h:53
std::string transition
Definition: parser.h:40
const Node & target
Definition: parser.h:41
GFG & operator=(const GFG &) const =delete
const Edge & addEdge(Node &s, const std::string &transition, const Node &t)
const Node & source
Definition: parser.h:39
Node(const std::string &n)
Definition: parser.h:45