1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#pragma once #include "bnf.h" #include "minicc.h" namespace Gram { 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); }; } // namespace Gram