摘要
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)资助~~