摘要
传统的分析器生成器多采用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)资助~~