semantic_main.c
#include <stdio.h>#include <ctype.h>#include "semantic.c"#include "scan.c"extern int TESTscan();extern int TESTparse();char Scanin[300],Scanout[300],Errorfile[300],Codeout[300];/*用于接收输入输出以及...
semantic.c
#include <stdio.h>#include <ctype.h>#include <conio.h>#define maxvartablep 500/*定义符号表达式*/int TESTparse();int program();int compound_stat();int statement();int expression_stat();int expression()...
scan_main.c
#include <stdio.h>#include <ctype.h>#include "scan.c"extern int TESTscan();char Scanin[300],Scanout[300];/*用于接收输入输出文件名*/FILE *fin,*fout;/*用于指向输入输出文件的指针*/void main(){ int e...
scan.c
#include <stdio.h>#include <ctype.h>/*下面定义保留字表,为简化程序,使用字符指针数组保存所有保留字*//*如果想增加保留字,可继续添加,并修改保留字树目keywordSum*/#define keywordSum 8char *keyword[keywor...
parse_main.c
#include <stdio.h>#include <ctype.h>#include "scan.c"#include "parse.c"extern int TESTscan();extern int TESTparse();char Scanin[300],Scanout[300];/*用于接收输入输出文件名*/FILE *fin,*fout;/*用于指向输...
parse.c
#include <stdio.h>#include <ctype.h>#include <conio.h>int TESTparse();int program();int compound_Stat();int statement();int expression_Stat();int expression();int bool_expr();int additive_expr();int t...