summaryrefslogtreecommitdiffhomepage
path: root/grammer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'grammer.cpp')
-rw-r--r--grammer.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/grammer.cpp b/grammer.cpp
new file mode 100644
index 0000000..a44104c
--- /dev/null
+++ b/grammer.cpp
@@ -0,0 +1,14 @@
+#include "grammer.h"
+
+Compiler::Compiler(const BNF& bnf, const std::string& Top): m_bnf(bnf), m_Top(Top), ReverseBNF{Reverse(bnf)}
+{
+}
+
+ProgramNode Compiler::compile(std::vector<Token> Tokens)
+{
+ if (Tokens.size()){
+ } else
+ throw std::runtime_error("No tokens!");
+
+ return {};
+}