diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-01-21 22:49:30 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-01-21 22:49:30 +0100 |
commit | f4b2027868c9733bbbbcb4c5ec6d5462a8447e5d (patch) | |
tree | 40ce459f1a501d6c88936c78f6dbcbb8aadd04ca /grammer.cpp | |
parent | 08997620fd617b580c1adbcb03c90cf621aa7069 (diff) |
Separate to cpp files
Diffstat (limited to 'grammer.cpp')
-rw-r--r-- | grammer.cpp | 14 |
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 {}; +} |