1 2 3 4 5 6 7 8 9 10 11 12 13 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 {}; }