计算机科学 ›› 2008, Vol. 35 ›› Issue (10): 170-172.

• • 上一篇    下一篇

消除GCC抽象语法树文本中冗余信息的算法研究

李鑫 王甜甜 苏小红 马培军   

  1. 哈尔滨工业大学计算机科学与技术系,哈尔滨150001
  • 出版日期:2018-11-16 发布日期:2018-11-16
  • 基金资助:
    国家自然科学基金(No.60373000).

LI Xin WANG Tian-tian SU Xiao-hong MA Pei-jun (School of Computer Science and Technology, Harbin Institute of Technology, Harbin 150001 ,China)   

  • Online:2018-11-16 Published:2018-11-16

摘要: 由GCC编译器对C语言源程序进行语法分析产生的抽象语法树文本存在大量的冗余信息,如果直接对其进行解析,则会产生解析效率低、产生的抽象语法树会占用大量的存储空间的问题。针对此问题,在深入研究GCC抽象语法树文本结构和解析过程的基础上,提出了一种高效消除冗余的算法,通过实验证明了算法的正确性和适用性,并提出了GCC抽象语法树解析的数学定义。

关键词: 抽象语法树(AST) 抽象语法树文本 抽象语法树的解析 规范化的抽象语法树文本 冗余

Abstract: 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 u

Key words: Abstract syntax tree,AST text,AST parsing,Canonical AST text,Redundancy

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!