From f4b2027868c9733bbbbcb4c5ec6d5462a8447e5d Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Tue, 21 Jan 2020 22:49:30 +0100 Subject: Separate to cpp files --- grammer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 grammer.cpp (limited to 'grammer.cpp') 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 Tokens) +{ + if (Tokens.size()){ + } else + throw std::runtime_error("No tokens!"); + + return {}; +} -- cgit v1.2.3