summaryrefslogtreecommitdiffhomepage
path: root/bnf.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-01-21 22:49:30 +0100
committerRoland Reichwein <mail@reichwein.it>2020-01-21 22:49:30 +0100
commitf4b2027868c9733bbbbcb4c5ec6d5462a8447e5d (patch)
tree40ce459f1a501d6c88936c78f6dbcbb8aadd04ca /bnf.h
parent08997620fd617b580c1adbcb03c90cf621aa7069 (diff)
Separate to cpp files
Diffstat (limited to 'bnf.h')
-rw-r--r--bnf.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/bnf.h b/bnf.h
new file mode 100644
index 0000000..8aa2684
--- /dev/null
+++ b/bnf.h
@@ -0,0 +1,17 @@
+#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>>>;
+using Terminals = std::set<std::string>;
+using ProgramNode = std::deque<std::string>;
+using PathElement = std::pair<std::string, size_t>; // Name, Index
+
+std::map<std::string, std::set<std::string>> Reverse(BNF bnf);