Efficient Computation of LALR(1) Look-Ahead Sets
ACM Transactions on Programming Languages and Systems (TOPLAS)
Operations on sparse relations
Communications of the ACM
Syntax of Programming Languages: Theory and Practice
Syntax of Programming Languages: Theory and Practice
Improving Gough's LL(1) lookahead generator
ACM SIGPLAN Notices
Hi-index | 0.00 |
The purpose of this note is to draw attention to the existence of a new, efficient algorithm for generating the LL(1) lookaheads for the productions of a context-free grammar. The algorithm is related to a classical method, but forms the sets First() and Follow() directly, rather than first forming the inverses.The success of the method depends on the application of an algorithm which forms a set-union on the transitive closure of a relation. This algorithm is the same one used in the DeRemer and Pennello algorithm for generating the LALR lookaheads for bottom-up parsers.A fuller account of the algorithm and its implementation is available in a technical report, Gough [1984].