summaryrefslogtreecommitdiffhomepage
path: root/grammer.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 /grammer.h
parent08997620fd617b580c1adbcb03c90cf621aa7069 (diff)
Separate to cpp files
Diffstat (limited to 'grammer.h')
-rw-r--r--grammer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/grammer.h b/grammer.h
new file mode 100644
index 0000000..5e76c60
--- /dev/null
+++ b/grammer.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "bnf.h"
+#include "minicc.h"
+
+class Compiler
+{
+
+private:
+ const BNF &m_bnf;
+ const std::string& m_Top;
+
+ std::map<std::string, std::set<std::string>> ReverseBNF;
+
+public:
+ Compiler(const BNF& bnf, const std::string& Top);
+ ProgramNode compile(std::vector<Token> Tokens);
+};
+