blob: 042db1fd186344f3f1e4dea58f445b9cc2172718 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef PCC_DRIVER_H
#define PCC_DRIVER_H
#include <cstdio>
#include "Context.hh"
#include "Location.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(std::string& filename);
void StopLexer();
void Parse(std::string& filename);
llvm::Module* GetModule();
llvm::IRBuilder<>* GetBuilder();
Location location_;
Context* context_;
};
} // namespace pcc
#endif
|