diff options
Diffstat (limited to 'Driver.hh')
| -rw-r--r-- | Driver.hh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Driver.hh b/Driver.hh new file mode 100644 index 0000000..5fc5d83 --- /dev/null +++ b/Driver.hh @@ -0,0 +1,28 @@ +#ifndef PCC_DRIVER_H +#define PCC_DRIVER_H + +#include <cstdio> + +#include "Context.hh" +#include "Parser.hh" + +#define YY_DECL pcc::Parser::symbol_type yylex(pcc::Driver& driver) + +YY_DECL; + +namespace pcc { +class Driver { + public: + Driver(Context* context); + ~Driver(); + int StartLexer(const std::string& filename); + void StopLexer(); + void Parse(const std::string& filename); + llvm::Module* GetModule(); + llvm::IRBuilder<>* GetBuilder(); + + Context* context_; +}; +} // namespace pcc + +#endif |
