lab2

所属分类:编译器/解释器
开发工具:Unix_Linux
文件大小:27KB
下载次数:12
上传日期:2015-12-18 16:05:36
上 传 者179019448
说明:  任务是在词法分析和语法分析程序的基础上编写一个程序,对C  源代码进行语义分析和类型检查,并打印分析结果。与实验一不同的是,实验二不再借助已有的工具,所有的任务都必须手写代码来完成。另外,虽然语义分析在整个编译器的实现中并不是难度最大的任务,但却是最细致、琐碎的任务。因此需要用心地设计诸如符号表、变量类型等数据结构的实现细节,从而正确、高效地实现语义分析的各种功能。 需要注意的是,由于在后面的实验中还会用到本次实验已经写好的代码,因此保持一个良好的代码风格、系统地设计代码结构和各模块之间的接口对于整个实验来讲相当重要。
(Task was to prepare the basis of lexical analysis and syntax analysis program on a program source code for C  semantic analysis and type checking, and print the results. The first experiment is different, no longer by means of experiment two existing tools, all tasks must be done hand-written code. In addition, although the semantic analysis is not the most difficult task in the whole compiler implementation, but it is the most detailed, trivial task. Therefore it needs careful design implementation details such as the symbol table, variable types of data structures, which correctly and efficiently implement various functions of semantic analysis.       It should be noted that, due later in the experiment will be used in this experiment has been written code, so keeping the interface between a good coding style, system design and code structure for each module in terms of the whole experiment quite important.)

文件列表:
code\data_structure.c (19353, 2015-05-12)
code\data_structure.h (1050, 2015-05-12)
code\lexical.l (3738, 2015-04-29)
code\main.c (793, 2015-05-12)
code\parser (59991, 2015-05-12)
code\syntax.y (9200, 2015-05-09)
code\treenode.c (1087, 2015-05-09)
code\treenode.h (505, 2015-05-01)
code (0, 2015-12-18)

近期下载者

相关文件


收藏者