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].
['K. John Gough']
A new method of generating LL(1) lookahead sets