节点文献

用递归下降方法实现自底向上的语法分析

Bottom-up parsing implementation with recursive descendent method

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 刘磊黄毅

【Author】 LIU Lei, HUANG Yi (College of Computer Science and Technology, Jilin University,Changchun 130012, China)

【机构】 吉林大学计算机科学与技术学院吉林大学计算机科学与技术学院 吉林长春130023吉林长春130023

【摘要】 针对LR(1)语法分析方法的分析能力较强,但其语法分析器的状态数太多,很难被应用的问题,提出了改进的LR(1)语法分析方法——RDLR(1)(RecursiveDescentLR(1))语法分析方法,同时给出了将LR(1)文法等价变换成RDLR(1)文法的一般方法。结果表明,该文法对语言的识别能力与LR(1)文法相同,比LALR(1)文法强;但其语法分析器的状态数却比LR(1)语法分析器的少,与LALR(1)语法分析器的状态数相当。

【Abstract】 LR(1) parsing method is powerful, but it generates too many states. An improved LR(1) parsing method—RDLR(1)(Recursive Descent LR(1)) is introduced, and a regular method to transform an LR(1) grammar into a RDLR(1) grammar is given. The results show that RDLR(1) grammar is as powerful as LR(1) grammar and more powerful than LALR(1) grammar. But RDLR(1) parsing is less complex than LR(1) parsing and as complex as LALR(1) parsing.

【关键词】 语法分析等价变换LR(1)LL(1)
【Key words】 parsingequivalence-transformationLR(1)LL(1)
【基金】 吉林大学创新基金资助项目(2002CX058)
  • 【文献出处】 吉林大学学报(信息科学版) ,Journal of Changchun Post and Telecommunication Institute , 编辑部邮箱 ,2004年03期
  • 【分类号】TP311
  • 【被引频次】13
  • 【下载频次】322
节点文献中: 

本文链接的文献网络图示:

本文的引文网络