摘要
由GCC编译器对C语言源程序进行语法分析产生的抽象语法树文本存在大量的冗余信息,如果直接对其进行解析,则会产生解析效率低、产生的抽象语法树会占用大量的存储空间的问题。针对此问题,在深入研究GCC抽象语法树文本结构和解析过程的基础上,提出了一种高效消除冗余的算法,通过实验证明了算法的正确性和适用性,并提出了GCC抽象语法树解析的数学定义。
There exist a lot of redundancies in AST text produced by GCC complier in the process of syntax analysis to a C program. If AST text is parsed directly, it will lead to a bad result that the efficiency of the parsing process is low and lots of memory is used by AST. In order to solve this problem,a highly efficient algorithm is put forward to eliminate redundancies based on a thorough research on the structure of GCC AST text and the parsing process. The correctness and practicality were proved by experiments and the mathematical definition of AST parsing was proposed.
出处
《计算机科学》
CSCD
北大核心
2008年第10期170-172,共3页
Computer Science
基金
国家自然科学基金(No.60373000)