Installing Bison-1.875

The Bison package contains a parser generator.

Approximate build time:  0.6 SBU
Required disk space:     10.6 MB

Official download location for Bison (1.875): 
ftp://ftp.gnu.org/gnu/bison/
And for the Bison Attribute Patch:
http://www.linuxfromscratch.org/patches/lfs/cvs/bison-1.875-attribute.patch

For its installation Bison depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed.

Installation of Bison

First fix a minor compilation problem that Bison has with some packages, the patch is backported from CVS:

patch -Np1 -i ../bison-1.875-attribute.patch

Now prepare Bison for compilation:

./configure --prefix=/usr

Compile the package:

make

This package has a test suite available which can perform a number of checks to ensure it built correctly. Should you choose to run it, the following command will do so (and takes a long time):

make check

And install the package:

make install

Contents of Bison

Installed programs: bison and yacc

Installed library: liby.a

Short descriptions

bison generates, from a series of rules, a program for analyzing the structure of text files. Bison is a replacement for yacc (Yet Another Compiler Compiler).

yacc is a wrapper for bison, meant for programs that still call yacc instead of bison. It calls bison with the -y option.

liby.a is the Yacc library containing implementations of Yacc-compatible yyerror and main functions. This library is normally not very useful, but POSIX requires it.