期刊文献+

用递归下降方法实现自底向上的语法分析 被引量:3

Bottom-up parsing implementation with recursive descendent method
下载PDF
导出
摘要 针对LR(1)语法分析方法的分析能力较强,但其语法分析器的状态数太多,很难被应用的问题,提出了改进的LR(1)语法分析方法——RDLR(1)(RecursiveDescentLR(1))语法分析方法,同时给出了将LR(1)文法等价变换成RDLR(1)文法的一般方法。结果表明,该文法对语言的识别能力与LR(1)文法相同,比LALR(1)文法强;但其语法分析器的状态数却比LR(1)语法分析器的少,与LALR(1)语法分析器的状态数相当。 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.
作者 刘磊 黄毅
出处 《吉林大学学报(信息科学版)》 CAS 2004年第3期267-272,共6页 Journal of Jilin University(Information Science Edition)
基金 吉林大学创新基金资助项目(2002CX058)
关键词 语法分析 等价变换 LR(1) LL(1) parsing equivalence-transformation LR(1) LL(1)
  • 相关文献

参考文献8

  • 1SORIN LERNER,TODD MILLSTEIN,CRAIG CHAMBERS.Automatically proving the correctness of compiler optimizations [C]// Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation.San Francisco,CA:ACM,2003:220-231.
  • 2ZHANG W,KARAKOY M,KANDEMIR M,et al.A compiler approach for reducing data cache energy [C]//Proceedings of the 17th Annual International Conference on Supercomputing.San Francisco,CA:ACM,2003:76-85.
  • 3JOHN WHALEY.Joeq:a virtual machine and compiler infrastructure [C]// Proceedings of the 2003 Workshop on Interpreters,Virtual Machines and Emulators.San Francisco,CA:ACM,2003:58-66.
  • 4NIJHOLT A.Deterministic Top-Down and Bottom-Up Parsing:Historical Notes and Bibliographies [M].NL:Mathematical Centre,1983.
  • 5HELEN MENG,PO-CHUI LUK,KUI XU,et al.GLR parsing with multiple grammars for natural language queries [J].ACM Transactions on Asian Language Information Processing,2002,1(2):123-144.
  • 6ALFRED A AHO,RAVI SETHI,JEFFREY D ULLMANN.Compilers:Principles,Techniques and Tools [M].UK:Addison-Wesley,1986.
  • 7HARRY R LEWIS,CHRISTOS H PAPADIMITRIOU.Elements of the Theory of Computation [M].UK:Prentice Hall,1998.
  • 8ESKO UKKONEN.Lower bounds on the size of deterministic parsers [J].JCSS,1983,26(2):153-170.

同被引文献25

  • 1金龙飞,刘磊.编译器前端构造工具及JLUCC的实现[J].吉林大学学报(信息科学版),2005,23(4):429-435. 被引量:3
  • 2付争方,张海娟.LR语法分析器构造方法初探[J].中国科技信息,2005(15A):113-113. 被引量:2
  • 3杨永安,余培军,张武光,冯祖仁,骆永进.面向航天器控制的专用语言及编译程序设计[J].计算机工程,2006,32(12):247-249. 被引量:6
  • 4杨永安,余培军,陈建平,冯祖仁,崔卫华.基于SCL的航天器遥控操作平台设计与实现[J].宇航学报,2006,27(3):438-441. 被引量:8
  • 5Weiser M. Program Slicing [ J]. IEEE Transactions on Software Engineering, 1984, 19(4) : 352-357.
  • 6Takashi Ishio, eShinji Kusumoto, Katsuro Inoue. Debugging Support for Aspect-oriented Program Based on Program Slicing and Call Graph [ C ]//Proceedings of the 20th IEEE International Conference on Software Maintenance. Washington : IEEE Computer Society, 2004 : 178-187.
  • 7LI Bi-xin. SSA: a Core Algorithm to Slice Programs [ J ]. Journal of Information and Computational Science (JOICS), 2005, 2(1) : 57-62.
  • 8Csaba F. Union Slices for Program Maintenance [ C ]//Proceedings of the International Conference on Software Maintenance (ICSM'02). Washington: IEEE Computer Society, 2002 : 12.
  • 9PAN Kai, Kim S, Jr Whitehead E J. Bug Classification Using Program Slicing Metrics [ C ]//Sixth IEEE International Workshop on Source Code Analysis and Manipulation. Washington: IEEE Computer Society, 2006:31-42.
  • 10ZHAO Jian-jun. A Slicing-based Approach to Extracting Reusable Software Architectures [ C ]//Proceedings of the Conference on Software Maintenance and Reengineering. Washington: IEEE Computer Society, 2000: 215.

引证文献3

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部