aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/bison-inst.xml
blob: 5d9e04b9890011c6bee9bc0ee9da25cc69f3c9a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<sect2>
<title>Installation of Bison</title>

<para>Install Bison by running the following commands:</para>

<para><screen><userinput>./configure --prefix=/usr &amp;&amp;
make &amp;&amp;
make install</userinput></screen></para>

<para>Some programs don't know about bison and try to find the yacc program
(bison is a (better) alternative for yacc). So to please those few
programs out there we'll create a bash script called yacc that calls bison
and have it emulate yacc's output file name conventions.</para>

<para>Create a new file <filename>/usr/bin/yacc</filename> by running the
following:</para>

<para><screen><userinput>cat &gt; /usr/bin/yacc &lt;&lt; "EOF"</userinput>
#!/bin/sh
# Begin /usr/bin/yacc

exec /usr/bin/bison -y "$@"

# End /usr/bin/yacc
<userinput>EOF
chmod 755 /usr/bin/yacc</userinput></screen></para>

</sect2>