-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFunction.hh
47 lines (39 loc) · 1.09 KB
/
Function.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
39
40
41
42
43
44
45
46
47
#ifndef Function_HH
#define Function_HH
class Function
{
DataType returnType;
string name;
SymbolTable localSymbolTable;
list<Ast *> statementList;
int lineno;
//datamember added for code generation
list<Instruction *> instLlist;
//datamember added for Intermediate code geneartion
list<Quadruple*> iCode;
public:
Function();
Function(DataType, string, int);
~Function();
void setfunctionname(string);
void setdatatype(DataType);
string getFunctionName();
void setLocalList(SymbolTable &);
SymbolTable getLocalList();
void setAstList(list<Ast *> &);
DataType getReturnType();
void setReturnType(DataType);
SymbolTableEntry & getSymbolTableEntry(string);
void print(ostream &);
void printSymbolTable(ostream &);
list<Ast*> getAstlist();
//functions added for code generation
//void generateTargetCode();
// void printTargetCode(ostream &);
void printPrologue(ostream &);
void printEpilogue(ostream &);
//functions added for intermediate code generation
void generateIntermediateCode();
void printIntermediateCode(ostream &);
};
#endif