期刊文献+

LR(k)任意文法位置的断点调试方法

A Breakpoint Debugging Method for LR(k) Grammars
下载PDF
导出
摘要 LR(k)文法能描述所有确定型上下文无关语言,广泛应用于各类分析器生成器中.传统的LR(k)文法断点调试方法仅支持在产生式右部末尾设置断点(后文简称尾部断点),不支持在产生式右部中间位置设置断点(后文简称中间断点),这给分析器的开发和调试带来了不便.文中提出了一种新颖的LR(k)文法断点调试方法,不但支持传统的尾部断点,还支持中间断点.该方法可显著增加可利用的断点数量,可以跟踪到更细粒度的文法成分,从而帮助用户更好地进行文法调试,降低分析器的开发难度. LR(k),the most general category of deterministic linear-time parsing,is widely used in various parser generators.The traditional breakpoint debugging methods for LR(k)grammars only support the breakpoints at the end of productions and do not support the breakpoints in the middle of productions.This brings lots of difficulties for grammar debugging.This paper proposes a new breakpoint debugging method,which supports breakpoint debugging for both middle and tail grammar positions.It can increase the debugging positions remarkably and can help debug grammars more effectively.
出处 《计算机学报》 EI CSCD 北大核心 2010年第3期483-492,共10页 Chinese Journal of Computers
基金 国家自然科学基金(60703057 60573084)资助~~
关键词 LR(k)文法 文法调试 断点调试 LR(k)grammar grammar debugging breakpoint debugging
  • 相关文献

参考文献17

  • 1Brown C A, Purdom P W. Methodology and notation for compiler front end design. Software-Practice and Experience, 1984, 14(4): 335-346.
  • 2Statlman Richard M, Pesch Roland, Shebs Stan. Debugging with GDB: The GNU Source-Level Debugger. 9th Edition. Boston, USA: Free Software Foundation, 2002.
  • 3Grune Dick, Jacobs Ceriel J H. Parsing Techniques: A Practical Guide. Chichester, England: Ellis Horwood Limited, 1990.
  • 4Sippu S. Soisalen-Soininen E. Parsing Theory. Berlin: Springer, 1990.
  • 5Aho Alfred V, Lam Monica S, Sethi Ravi, Ullman Jeffrey D. Compilers: Principles, Techniques, and Tools. Boston: Addison Wesley, USA, 1986.
  • 6Mossenbock H. A convenient way to incorporate semantic actions in two-pass compiling schemes. Software-Practice & Experience, 1988, 18(7): 691-700.
  • 7Johnson Stephen C. YACC--Yet another compiler-compiler. Bell Laboratories, New-Jersey: Computer Science Technical Report 32, 1974.
  • 8Purdom P, Brown C A. Semantic routines and LR(k) parsers. Acta Informatica, 1980, 14(4): 299-315.
  • 9Tarjan Robert. Depth-first search and linear graph algorithms//Proceedings of the 12th Annual Symposium on Switching and Automata Theory. East Lansing, Michigan, USA, 1971: 114-121.
  • 10Lengauer T, Tarjan R E. A fast algorithm for finding dominators in a flow graph. ACM Transactions on Programming Languages and Systems, 1979, 1(1): 121-141.

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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