Affiliation:
1. Queensland Institute of Technology, Brisbane, Australia
Abstract
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].
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference6 articles.
1. Backhouse "The Syntax of Programming Languages" Prentice-Hall 1979. Backhouse "The Syntax of Programming Languages" Prentice-Hall 1979.
2. On computing the transitive closure of a relation
3. Efficient Computation of LALR(1) Look-Ahead Sets
4. Gough "A new method of generating LL(1) lookahead sets." QIT Computer Science Reports CSR 84/1 1984. Gough "A new method of generating LL(1) lookahead sets." QIT Computer Science Reports CSR 84/1 1984.
5. Operations on sparse relations
Cited by
1 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献