blob: 2fdc86d28195c02079c352173f4eb1fa57e567d2 (
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
|
#ifndef PCC_DRIVER_H
#define PCC_DRIVER_H
#include <cstdio>
#include "BaseNode.hh"
#include "Context.hh"
#include "Location.hh"
namespace pcc {
class Driver {
public:
Driver(const char* name);
~Driver();
int StartLexer(std::string& filename);
void StopLexer();
std::shared_ptr<ProgramNode> Parse(std::string& filename);
void SetRoot(std::shared_ptr<ProgramNode> root);
Context* GetContext();
Location location_;
private:
Context context_;
std::shared_ptr<ProgramNode> root_;
};
} // namespace pcc
#endif
|