Next: , Up: A Brief History of the Greater Ungulates   [Contents][Index]


11.1 The ancestral Yacc

Bison originated as a workalike of a program called Yacc — Yet Another Compiler Compiler.9 Yacc was written at Bell Labs as part of the very early development of Unix; one of its first uses was to develop the original Portable C Compiler, pcc. The same person, Steven C. Johnson, wrote Yacc and the original pcc.

According to the author 10, Yacc was first invented in 1971 and reached a form recognizably similar to the C version in 1973. Johnson published A Portable Compiler: Theory and Practice (see Johnson 1978).

Yacc was not itself originally written in C but in its predecessor language, B. This goes far to explain its odd interface, which exposes a large number of global variables rather than bundling them into a C struct. All other Yacc-like programs are descended from the C port of Yacc.

Yacc, through both its deployment in pcc and as a standalone tool for generating other parsers, helped drive the early spread of Unix. Yacc itself, however, passed out of use after around 1990 when workalikes with less restrictive licenses and more features became available.

Original Yacc became generally available when Caldera released the sources of old versions of Unix up to V7 and 32V in 2002. By that time it had been long superseded in practical use by Bison even on Yacc’s native Unix variants.


Footnotes

(9)

Because of the acronym, the name is sometimes given as “YACC”, but Johnson used “Yacc” in the descriptive paper included in the Version 7 Unix Manual.

(10)

https://lists.gnu.org/r/bison-patches/2019-02/msg00061.html