-
Notifications
You must be signed in to change notification settings - Fork 2
/
codegen.h
36 lines (32 loc) · 1.05 KB
/
codegen.h
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
/*
BATCH NO. 27
Mayank Agarwal (2014A7PS111P)
Karan Deep Batra(2014A7PS160P)
*/
#ifndef _codegen_h_
#define _codegen_h_
#include "symboltable.h"
#include "hashtable.h"
#include "token.h"
#include "parserDef.h"
#include "mainsymboltable.h"
#include "idsymboltable.h"
#include "typeExtractor.h"
// void endcode();
// void initialize(/*FILE* fp, */mainsymboltable* globalTable);
// void codegenexp(stacknode* curr);
// int getlabel();
// void codegeniterative(stacknode* temp);
// void code_statement(stacknode* temp);
// void traverseAST_forCodegen(stacknode* curr);
// void generate_code(mainsymboltable* globalTable, stacknode* astroot);
void endcode(FILE* fp);
void initialize(FILE* fp, mainsymboltable* globalTable);
void codegenexp(FILE* fp, stacknode* curr);
int getlabel();
void codegeniterative(FILE* fp, stacknode* temp);
void codegenconditional(FILE* fp, stacknode* curr);
void code_statement(FILE* fp, stacknode* temp);
void traverseAST_forCodegen(FILE* fp, stacknode* curr);
void generate_code(FILE* fp, mainsymboltable* globalTable, stacknode* astroot);
#endif