首页 | 本学科首页   官方微博 | 高级检索  
     检索      


Diagnostics on LALR(k) conflicts based on a method for LR(k) Testing
Authors:Bent Bruun Kristensen  Ole Lehrmann Madsen
Institution:(1) Aalborg University Center, Aalborg, Denmark;(2) Computer Science Department, Aarhus University, Aarhus, Denmark
Abstract:A user of an LALR(k) parser generator system may have difficulties in understanding how a given LALR(k) conflict is generated. This is especially difficult if the conflict does not correspond to an LR(k) conflict.A practical method for giving informative diagnostics on LALR(k) conflicts is presented. The diagnostics distinguish between those LALR(k) conflicts that correspond to LR(k) conflicts and those that do not. As a side effect the user is thus informed whether or not his grammar is in fact LR(k) despite not being LALR(k).The method is based on an algorithm for testing LR(k)-ness using the LR(0) machine supplied with LALR(k) lookahead sets. This algorithm is presented and its correctness is proved.
Keywords:
本文献已被 SpringerLink 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号