Description: 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.
To Search:
File list (Check if you may need any files):
code\data_structure.c
....\data_structure.h
....\lexical.l
....\main.c
....\parser
....\syntax.y
....\treenode.c
....\treenode.h
code