aboutsummaryrefslogtreecommitdiffstats
path: root/appendixa/bison-desc.xml
diff options
context:
space:
mode:
authorMark Hymers <markh@linuxfromscratch.org>2001-07-22 19:45:10 +0000
committerMark Hymers <markh@linuxfromscratch.org>2001-07-22 19:45:10 +0000
commitb822811980a5f82726cb641cbeff66be9eb6d92a (patch)
tree27c4db3c62aaea065b053e43c39b2ba44c04a05f /appendixa/bison-desc.xml
parent46f5461af92bc70c62bbb92895032b930954d835 (diff)
XML changes
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@827 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'appendixa/bison-desc.xml')
-rw-r--r--appendixa/bison-desc.xml43
1 files changed, 13 insertions, 30 deletions
diff --git a/appendixa/bison-desc.xml b/appendixa/bison-desc.xml
index 15d68fc7b..f360f9fbd 100644
--- a/appendixa/bison-desc.xml
+++ b/appendixa/bison-desc.xml
@@ -1,57 +1,41 @@
<sect2>
<title>Contents</title>
-<para>
-The Bison package contains the bison program.
-</para>
+<para>The Bison package contains the bison program.</para>
</sect2>
<sect2><title>Description</title>
-<para>
-Bison is a parser generator, a replacement for YACC. YACC stands for Yet
+<para>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.
-</para>
+those rules a program is constructed that analyzes the text file.</para>
-<para>
-There are a lot of examples where structure is needed and one of them is
-the
-calculator.
-</para>
+<para>There are a lot of examples where structure is needed and one of them is
+the calculator.</para>
-<para>
-Given the string :
-</para>
+<para>Given the string :</para>
-<blockquote><literallayout>
- 1 + 2 * 3
-</literallayout></blockquote>
+<blockquote><literallayout> 1 + 2 * 3</literallayout></blockquote>
-<para>
-A human can easily come to the result 7. Why? Because of the structure.
+<para>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:
-</para>
+to the compiler:</para>
-<blockquote><literallayout>
- +
+<blockquote><literallayout> +
/ \
* 1
/ \
- 2 3
-</literallayout></blockquote>
+ 2 3</literallayout></blockquote>
-<para>
-Starting at the bottom of a tree and coming across the numbers 2 and
+<para>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
@@ -59,8 +43,7 @@ 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 it's way up to the top and comes with the correct
-answer. Of course, Bison isn't only used for calculators alone.
-</para>
+answer. Of course, Bison isn't only used for calculators alone.</para>
</sect2>