#ifndef COMPILER_H #define COMPILER_H #include #include #include class Compiler { public: Compiler(const std::string & out_filename); ~Compiler(); void writeHeader(const std::string & str); void writeFunction(const std::string & str); void beginFunction(const std::string & name); void close(); protected: FILE * m_outfile; std::string m_header; std::map m_functions; std::string m_current_function; bool m_file_open; }; #endif