skip to main content
article
Free Access

An efficient context-free parsing algorithm

Published:01 February 1970Publication History
Skip Abstract Section

Abstract

A parsing algorithm which seems to be the most efficient general context-free algorithm known is described. It is similar to both Knuth's LR(k) algorithm and the familiar top-down algorithm. It has a time bound proportional to n3 (where n is the length of the string being parsed) in general; it has an n2 bound for unambiguous grammars; and it runs in linear time on a large class of grammars, which seems to include most practical context-free programming language grammars. In an empirical comparison it appears to be superior to the top-down and bottom-up algorithms studied by Griffiths and Petrick.

References

  1. 1 EARLEY, J. An efficient context-free parsing algorithm. Ph.D. Thesis, Comput. Sei. Dept., Carnegie-Mellon U., Pittsburgh, Pa., 1968. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 KNUTH, D. E. On the translation of languages from left to right. Information and Control 8 (1965), 607-639.Google ScholarGoogle ScholarCross RefCross Ref
  3. 3 FLOYD, R. W. The syntax of programming languages--a survey. IEEE Trans. EC-13, 4 (Aug. 1964).Google ScholarGoogle Scholar
  4. 4 YOUNGER, D. H. Recognition and parsing of context-free languages in time n 3. Information and Control 10 (1967), 189- 208.Google ScholarGoogle ScholarCross RefCross Ref
  5. 5 HAys, D. Automatic language-data processing. In Computer Applications in the Behavioral Sciences, H. Borko (Ed.) Prentice Hall, Englewood Cliffs, N.J., 1962.Google ScholarGoogle Scholar
  6. 6 YOUNGER, D.H. Context-free language processing in time n 3. General Electric R & D Center, Schenectady, N.Y., 1966.Google ScholarGoogle Scholar
  7. 7 KASAMI, T., AND TORII, K. A syntax-analysis procedure for unambiguous context-free grammars. J. ACM 16, 3 (July 1969), 423--431. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 GRIFFITHS, T., AND PETRICK, S. On the relative efficiencies of context-free grammar recognizers. Comm. ACM 8, 5 (May 1965), 289-300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 FELDMAN, J., AND GRIES, D. Translator writing systems. Comm. ACM 11, 2 (Feb. 1968), 77-113. Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image Communications of the ACM
    Communications of the ACM  Volume 13, Issue 2
    Feb 1970
    70 pages
    ISSN:0001-0782
    EISSN:1557-7317
    DOI:10.1145/362007
    Issue’s Table of Contents

    Copyright © 1970 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 1 February 1970

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader