-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram.hh
38 lines (28 loc) · 860 Bytes
/
program.hh
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
31
32
33
34
35
36
37
38
#ifndef PROGRAM_HH
#define PROGRAM_HH
class Program
{
SymbolTable globalSymbolTable;
map<string, Function *> FunctionMap;
public:
Program();
~Program();
Function * getFunctionDetails(string );
void addFunctionDetails(string , Function *);
void setFunctionMap(map<string, Function *> &);
void setGlobalTable(SymbolTable &);
SymbolTableEntry & getSymbolTableEntry(string);
void printSymbolTable(ostream &o);
void print(ostream &o);
void printAst(ostream &o);
Function * getMainFunction();
bool variableFunctionNameCheck(string);
bool variableInSymbolTableCheck(string);
//functions added for code generation
//void generateTargetCode();
//void printTargetCode(ostream &);
//functions added for intermediate code generation
void generateIntermediateCode();
void printIntermediateCode(ostream & o);
};
#endif