Yacc is a general tool for describing the input to computer programs. It generates a LALR parser that analyzes tokens from Lex and creates a syntax tree based on the grammar rules specified. Yacc was originally developed in the 1970s and generates C code for the syntax analyzer from a grammar similar to BNF. It has been used to build compilers for languages like C, Pascal, and APL as well as for other programs like document retrieval systems.