Efficient computation of LALR(1) look-ahead sets

  • Authors:
  • Thomas J. Pennello;Frank DeRemer

  • Affiliations:
  • ARC International, Santa Cruz, CA;Santa Cruz, CA

  • Venue:
  • ACM SIGPLAN Notices - Best of PLDI 1979-1999
  • Year:
  • 2004

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-compiler (YACC).