Bison

For installation instructions see the Section called Installing Bison-1.875 in Chapter 6.

Official Download Location

Bison (1.875): 
ftp://ftp.gnu.org/gnu/bison/

Contents of Bison

(Last checked against version 1.35.)

Bison is a parser generator, a replacement for yacc. Bison generates a program that analyzes the structure of a text file.

Bison installs the following:

Program Files

bison and yacc

Descriptions

(Last checked against version 1.35.)

Program file descriptions

bison

bison is a parser generator, a replacement for yacc. yacc stands for Yet Another Compiler Compiler. What is bison then? It is a program that generates a program that analyzes the structure of a text file. Instead of writing the actual program a user specifies how things should be connected and with those rules a program is constructed that analyzes the text file. There are a lot of examples where structure is needed and one of them is the calculator.

Given the string :

        1 + 2 * 3

A human can easily come to the result 7. Why? Because of the structure. Our brain knows how to interpret the string. The computer doesn't know that and bison is a tool to help it understand by presenting the string in the following way to the compiler:

            +
           / \
          *   1
         / \
        2   3

Starting at the bottom of a tree and coming across the numbers 2 and 3 which are joined by the multiplication symbol, the computer multiplies 2 and 3. The result of that multiplication is remembered and the next thing that the computer sees is the result of 2*3 and the number 1 which are joined by the add symbol. Adding 1 to the previous result makes 7. In calculating, the most complex calculations can be broken down in this tree format and the computer just starts at the bottom and works its way up to the top and comes with the correct answer. Of course, bison isn't only used for calculators alone.

yacc

This bash script calls bison using the -y option. This is for compatibility purposes for programs which use yacc instead of bison.

Bison Installation Dependencies

(Last checked against version 1.31.)

Bash: sh
Binutils: ar, as, ld, ranlib
Coreutils: basename, cat, chmod, cp, dirname, echo, expr, head, hostname,
             install, ln, ls, mkdir, mv, rm, rmdir, sleep, tr, uname, uniq
Diffutils: cmp
GCC: cc, cc1, collect2, cpp0, gcc
Grep: egrep, fgrep, grep
Make: make
Sed: sed
Texinfo: install-info