摘要
分析了LALR(1)分析器生成系统中语法分析冲突问题的起因和解决冲突的时机及策略,提出改写文法应遵循的4条规则,将常用的文法改写技巧总结为7个基本的文法改写模式.应用案例表明,提出的文法改写规则和基本文法改写模式可有效解决语法分析冲突.
The origin of the parsing conflicts of grammar by using LALR(1) parser generators is analyzed. The moment and methods to eliminate conflicts in compiling phases is studied. Four basic rules of grammar rewriting as well as seven basic grammar rewriting patterns to resolve conflicts are proposed. Case studies show that the proposed techniques are highly effective in developing conflict-free parsers.
出处
《北京邮电大学学报》
EI
CAS
CSCD
北大核心
2006年第3期86-90,共5页
Journal of Beijing University of Posts and Telecommunications
基金
国家自然科学基金项目(60573084)