5.5 YACC, A LALR(1) Bottom-up Parser Generator

This section describes YACC, Yet Another Compiler-Compiler, written by Steve Johnson at Bell Telephone Laboratories in 1975 for the UNIX operating system. Like LEX, versions have been ported to other machines and other operating systems, and, like the discussions of LEX, the discussion here is not intended as a user manual for YACC.

YACC produces a parser which is a C program. This C program can be compiled and linked with other compiler modules, including the scanner generated by LEX or any other scanner. Versions which have been ported to other operating systems can produce programs in other languages such as Pascal or Ada.

YACC accepts a BNF grammar as input. Each production may have an action associated with it.

Yacc Metalanguage

Yacc Functionality

Send questions and comments to: Karen Lemone