Efficient computation of LALR(1) look-ahead sets

  • Authors:
  • Frank DeRemer;Thomas J. Pennello

  • Affiliations:
  • Information Sciences, University of California, Santa Cruz, CA;Information Sciences, University of California, Santa Cruz, CA

  • Venue:
  • SIGPLAN '79 Proceedings of the 1979 SIGPLAN symposium on Compiler construction
  • Year:
  • 1979

Quantified Score

Hi-index 0.00

Visualization

Abstract

We define two relations that capture the essential structure of the problem of computing LALR(1) look-ahead sets, and present an efficient algorithm to compute the sets in time linear in the size of the relations. In particular, for a PASCAL grammar, our algorithm performs less than 20% of the set unions performed by a popular-compiler (YACC).