TY - GEN
T1 - IELR(1)
T2 - 23rd Annual ACM Symposium on Applied Computing, SAC'08
AU - Denny, Joel E.
AU - Malloy, Brian A.
PY - 2008
Y1 - 2008
N2 - There has been a recent effort in the literature to reconsider grammar-dependent software development from an engineering point of view. As part of that effort, we examine a deficiency in the state of the art of practical LR parser table generation. Specifically, LALR sometimes generates parser tables that do not accept the full language that the grammar developer expects, but canonical LR is too inefficient to be practical. In response, many researchers have attempted to develop minimal LR parser table generation algorithms. In this paper, we demonstrate that a well known algorithm described by David Pager and implemented in Menhir, the most robust minimal LR(1) implementation we have discovered, does not always achieve the full power of canonical LR(1) when the given grammar is non-LR(1) coupled with a specification for resolving conflicts. We also outline an original minimal LR(1) algorithm, IELR(1), which we have implemented as an extension of GNU Bison and which does not exhibit this deficiency. Finally, using our implementation, we demonstrate the relevance of this deficiency for several real-world grammars, and we show that our implementation is feasible for generating minimal LR(1) parsers for those grammars.
AB - There has been a recent effort in the literature to reconsider grammar-dependent software development from an engineering point of view. As part of that effort, we examine a deficiency in the state of the art of practical LR parser table generation. Specifically, LALR sometimes generates parser tables that do not accept the full language that the grammar developer expects, but canonical LR is too inefficient to be practical. In response, many researchers have attempted to develop minimal LR parser table generation algorithms. In this paper, we demonstrate that a well known algorithm described by David Pager and implemented in Menhir, the most robust minimal LR(1) implementation we have discovered, does not always achieve the full power of canonical LR(1) when the given grammar is non-LR(1) coupled with a specification for resolving conflicts. We also outline an original minimal LR(1) algorithm, IELR(1), which we have implemented as an extension of GNU Bison and which does not exhibit this deficiency. Finally, using our implementation, we demonstrate the relevance of this deficiency for several real-world grammars, and we show that our implementation is feasible for generating minimal LR(1) parsers for those grammars.
KW - Grammars
KW - Grammarware
KW - LALR
KW - LR
KW - Yacc
UR - http://www.scopus.com/inward/record.url?scp=56749168628&partnerID=8YFLogxK
U2 - 10.1145/1363686.1363747
DO - 10.1145/1363686.1363747
M3 - Conference contribution
AN - SCOPUS:56749168628
SN - 9781595937537
T3 - Proceedings of the ACM Symposium on Applied Computing
SP - 240
EP - 245
BT - Proceedings of the 23rd Annual ACM Symposium on Applied Computing, SAC'08
Y2 - 16 March 2008 through 20 March 2008
ER -