Toggle Main Menu Toggle Search

Open Access padlockePrints

Efficient LR(1) Parsers

Lookup NU author(s): Emeritus Professor Tom Anderson

Downloads

Full text for this publication is not currently held within this repository. Alternative links are provided below where available.


Abstract

Knuth'sLR(1) parsing algorithm is sufficiently general to handle the parsing of most programming languages with the additional benefit of earlier detection of syntax errors than in other formal methods used in compilers. The major obstacle impeding the use of this algorithm is the large space requirement for parsing tables. In addition, certain optimisations described here, which increase parsing speed, exacerbate the space problem.Two approaches for overcoming this problem are explored.1. Using parsers related to theLR(1) parser which parse a large subset of theLR(1) grammars, but which have much smaller parsing tables.2. Devising compact encodings and performing space optimisations on these tables.Time and space efficiency is evaluated using the Stanford University Algol W compiler as a base for comparison since the parsing routine in this compiler is among the more efficient presently used.


Publication metadata

Author(s): Anderson T, Eve J, Horning JJ

Publication type: Article

Publication status: Published

Journal: Acta Informatica

Year: 1973

Volume: 2

Issue: 1

Pages: 12-39

ISSN (print): 0001-5903

ISSN (electronic): 1432-0525

Publisher: Springer

URL: http://dx.doi.org/10.1007/BF00571461

DOI: 10.1007/BF00571461


Altmetrics

Altmetrics provided by Altmetric


Share