期刊文献+

一种有效的GLR分析器错误恢复方法 被引量:1

An Effective Error Recovery Method for GLR Parsers
下载PDF
导出
摘要 传统的分析器生成器多采用LALR(1)、LL(1)等确定性分析方法.近年来,随着软件再(逆向)工程的发展,GLR等非确定性的分析方法逐渐应用到分析器生成器中,但目前尚未有公开发表的文献提出并解决了自动生成的GLR分析器的错误处理和恢复问题.文中提出了一种基于子串分析的错误恢复方法,实验结果表明,该方法可以有效侦测和恢复输入串中的语法错误,具有较高的错误处理效率,有望应用到以GLR为核心算法的分析器生成器中. Deterministic parsing methods such as LALR(1) and LL(1) are widely used in tradi- tional parser generators. Nondeterministic parsing methods such as GLR are used in recent parser generators with the development of software reverse engineering and reengineering. However, there is no published literature to show how to make automatic error recovery for GLR parsers. A new substring based error recovery method is presented, which can detect and recover from par- sing errors effectively. Experimental data shows that this method has good performance, and can be used in GLR parser generators.
出处 《计算机学报》 EI CSCD 北大核心 2013年第6期1325-1336,1333-1336,共12页 Chinese Journal of Computers
基金 北京林业大学青年科学基金(2010BLX14) 国家自然科学基金(60573084)资助~~
关键词 GLR 语法分析器 分析器生成器 错误处理 错误恢复 GLR parser parser generator error handling error recovery
  • 相关文献

参考文献21

  • 1Brand M V D, Sellink A, Verhoed C. Current parsing tech-niques in software renovation considered harmful//Proceed-ings of the 6th International Workshop on Program Compre-hension. Ischia, Italy, 1998: 108-117.
  • 2Tomita M. Generalized LR Parsing. Boston: Kluwer Aca-demic Publishers, 1991.
  • 3Brand M V D,Heering J, Klint P, et al. Compiling languagedefinitions: The ASF+SDF compiler. ACM Transactions onProgramming Languages and Systems(TOPLAS), 2002,24(4): 334-368.
  • 4Degano P,Priami C. Comparison of syntactic error handlingin LR parsers. Software-Practice and Experience, 1995,25(6): 657-679.
  • 5Peterson T G. Syntax error detection, correction and recov-ery in parsers [Ph. D. dissertation]. Stevens Institute ofTechnology, Hoboken, 1972.
  • 6Grune D, Jacobs C J H. Parsing Techniques: A PracticalGuide. New York: Ellis Horwood, 1990.
  • 7Aho A V,Sethi R, Ullman J D. Compilers, Principles,Techniques, and Tools. Boston: Addison-Wesley, 1986.
  • 8Graham S L, Haley C B, Joy W N. Practical LR error recov-ery. ACM SIGPLAN Notices, 1979,14(8): 168-175.
  • 9McKenzie B J, Yeatman C, Vere L. Error repair in shift-re-duce parsers. ACM Transactions on Programming Languagesand Systems,1995,17(4): 672-689.
  • 10Pai A B,Kieburtz R B. Global context recovery: A newstrategy for syntactic error recovery by table-drive parsers.ACM Transactions on Programming Languages and Systems,1980,2(1): 18-41.

二级参考文献7

  • 1李虎,金茂忠,许福,张敏.程序设计语言的GLR优化分析[J].软件学报,2005,16(2):174-183. 被引量:2
  • 2J R Levine, T Mason, D Brown. Lex & Yacc [M]. Third edition. Sebastopol, USA: O'Reilly & Associates Inc, 1995.
  • 3A V Aho, R Sethi, J D Ullman. Compilers: Principles, Techniques, and Tools [M]. Reading MA: Addison-Wesley, 1986.
  • 4R N Horspool. Incremental generation of LR parsers [J]. Computer Languages, 1990, 15(4) ; 205-233.
  • 5F Deremer, T Pennello. Efficient computation of LALR ( 1 ) look-ahead sets [J]. ACM TOPLAS, 1982, 4(4): 615-649.
  • 6C Donnelly, R Stallmen. The Bison Manual: Using the YACCCompatible Parser Generator for Bison Version 1.875 [M]. Boston, USA: GNU Press, 2004.
  • 7M Astudill. GOLD parsing system [OL]. http://www. devincook com/goldparser/index. htm. 2006.

共引文献2

同被引文献1

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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