-
Notifications
You must be signed in to change notification settings - Fork 17
/
CGen.h
48 lines (32 loc) · 1.04 KB
/
CGen.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
37
38
39
40
41
42
43
44
45
46
47
48
/*********************************************************************
* NAME: Benjamin Fowler
* NUMBER: 02251132
* SUBJECT: Modern Compiler Construction
* INSTRUCTOR: Dr Wayne Kelly
*********************************************************************
* MODULE: CGen.h
* PURPOSE: Declares the public portions of the code generator
* module.
* DATE STARTED: 21st May, 2000.
* LAST EDITED: 21st May, 2000.
*********************************************************************/
#ifndef CGEN_H
#define CGEN_H
#define STACKMARKSIZE 8
#include "Globals.h"
/*
* Constant definitions that need to be visible elsewhere.
*/
#define WORDSIZE 4
/*
* externs that need to be visible here
*/
extern int TraceCode;
/*
* NAME: codeGen()
* PURPOSE: Generates code from the program's abstract syntax tree, and
* sends the resulting dcodes to the file named by "fileName".
*/
void codeGen(TreeNode *syntaxTree, char *fileName, char *moduleName);
#endif
/* END OF FILE */