Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Efficient full LR(I) parser generation
ACM SIGPLAN Notices
Generation of formatters for context-free languages
ACM Transactions on Software Engineering and Methodology (TOSEM)
Efficient Computation of LALR(1) Look-Ahead Sets
ACM Transactions on Programming Languages and Systems (TOPLAS)
FASE '01 Proceedings of the 4th International Conference on Fundamental Approaches to Software Engineering
The lane tracing algorithm for constructing LR(k) parsers
STOC '73 Proceedings of the fifth annual ACM symposium on Theory of computing
Current Parsing Techniques in Software Renovation Considered Harmful
IWPC '98 Proceedings of the 6th International Workshop on Program Comprehension
ACM SIGPLAN Notices
Toward an engineering discipline for grammarware
ACM Transactions on Software Engineering and Methodology (TOSEM)
Science of Computer Programming
Full LR(1) parser generator Hyacc and study on the performance of LR(1) algorithms
Proceedings of The Fourth International C* Conference on Computer Science and Software Engineering
Hi-index | 0.00 |
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.