Compiler Compiler 

Yet Another Compiler Compiler.

Language used by the Yacc LALR parser generator.

Related languages
TMG => YACC   Influence
YACC => AYACC   Implementation
YACC => Bison   Implementation
YACC => MLYACC   Implementation
YACC => perl-byacc   Implementation
YACC => SASL-YACC   Implementation
YACC => YACC++   Evolution of

  • Aho, A. V. and Johnson, S. C. "LR Parsing" pp99-124 view details
          in [ACM] ACM Computing Surveys (CSUR) 6(2) June 1974 view details
  • Johnson, S.C. "YACC Yet Another Compiler Compiler", CS TR 32, Bell Labs (Jul 1975). view details External link: Online copy External link: Online copy Abstract: Computer program input generally has some structure; in fact, every computer program that does input can be thought of as defining an "input language'' which it accepts. An input language may be as complex as a programming language, or as simple as a sequence of numbers. Unfortunately, usual input facilities are limited, difficult to use, and often are lax about checking their inputs for validity.

    Yacc provides a general tool for describing the input to a computer program. The Yacc user'specifies the structures of his input, together with code to be invoked as each such structure is recognized. Yacc turns such a specification into a subroutine that handles the input process; frequently, it is convenient and appropriate to have most of the flow of control in the user's application handled by this subroutine.

    The input subroutine produced by Yacc calls a user'supplied routine to return the next basic input item. Thus, the user can specify his input in terms of individual input characters, or in terms of higher level constructs such as names and numbers. The user'supplied routine may also handle idiomatic features such as comment and continuation conventions, which typically defy easy grammatical specification.

    Yacc is written in portable C. The class of specifications accepted is a very general one: LALR(1) grammars with disambiguating rules.

    In addition to compilers for C, APL, Pascal, RATFOR, etc., Yacc has also been used for less conventional languages, including a phototypesetter language, several desk calculator languages, a document retrieval system, and a Fortran debugging system.
          in [ACM] ACM Computing Surveys (CSUR) 6(2) June 1974 view details
  • Johnson, S. C. "A Portable Compiler: Theory and Practice," pp97-104 view details
          in [ACM SIGACT-SIGPLAN] Proceedings of the 5th ACM SIGACT-SIGPLAN symposium on Principles of programming languages 1978 , Tucson, Arizona view details