summaryrefslogtreecommitdiffhomepage
path: root/bnf.h
blob: 56aacb048808109667de9618ab53e0f4dab11df9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <deque>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>

using namespace std::string_literals;

using BNF = std::map<std::string, std::vector<std::vector<std::string>>>;

std::map<std::string, std::set<std::string>> Reverse(BNF bnf);

BNF SubBNF(const BNF& bnf, const std::string& top);