| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | <sect2><title>Contents of Bison-&bison-contversion;</title><sect3><title>Program Files</title><para>bison and yacc</para></sect3><sect3><title>Descriptions</title><sect4><title>bison</title><para>bison is a parser generator, a replacement for yacc. yacc stands for YetAnother Compiler Compiler. What is bison then? It is a program thatgenerates a program that analyzes the structure of a text file. Instead ofwriting the actual program a user specifies how things should be connectedand 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.</para><para>Given the string :</para><blockquote><literallayout>        1 + 2 * 3</literallayout></blockquote><para>A human can easily come to the result 7. Why? Because of the structure. Our brain knowshow to interpret the string. The computer doesn't know that and bison is atool to help it understand by presenting the string in the following wayto the compiler:</para><blockquote><literallayout>            +           / \          *   1         / \        2   3</literallayout></blockquote><para>Starting at the bottom of a tree and coming across the numbers 2 and3 which are joined by the multiplication symbol, the computermultiplies 2 and 3. The result of that multiplication is remembered andthe next thing that the computer sees is the result of 2*3 and thenumber 1 which are joined by the add symbol. Adding 1 to the previousresult makes 7. In calculating the most complex calculations can bebroken down in this tree format and the computer just starts at thebottom and works its way up to the top and comes with the correctanswer. Of course, bison isn't only used for calculatorsalone.</para></sect4><sect4><title>yacc</title><para>We create a yacc script which calls bison using the -y option.This is for compatibility purposes for programs which use yacc insteadof bison.</para></sect4></sect3></sect2>
 |