-
Notifications
You must be signed in to change notification settings - Fork 0
/
Readme
40 lines (27 loc) · 1.12 KB
/
Readme
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
Project Name: Semantic Analysis
NOTICE: COPY FROM OTHERS WILL BOTH GET ZERO!
Project Specification:
Please See PROGRAM Section, Chapter Five, Modern Compiler Implementation in C.
(Page 103 to 124 for English Version, Page Youknow for Chinese Version.:))
Due Date: December 15th, 2016
Submission:
Make a tarball which contains all necessary source files.
***** The source code should be WELL commented, or a document is needed. *****
Note:
Compiling Error means Zero Point. Standard Test Platform is Linux version 2.6.32-5-amd64 (Debian 2.6.32-31).
Make sure that your output is the same as reference output.
TA in Charge: Zhang Xiaohan xh_zhang@fudan.edu.cn
TODO
implement env.h and env.c
semant.h:
void SEM_transProg(A_exp exp);
implement semant.c
The four recursive functions
void SEM_trnasProg(A_exp exp);
that type checks exp.
Handle recursive and mutually recursive declarations.
Check that a "break" is within a "for" or "while"
Illegal cycles in type declaration
implement a main() (in parse.c) that:
calls the parser
calls the function SEM_transProg()