aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/bison-inst.xml
blob: 6d44ec182dd17ef31f24fa40130d6caca634f1fb (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<sect2>
<title>Installation of Bison</title>

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

<blockquote><literallayout>

	<userinput>./configure --prefix=/usr \</userinput>
	<userinput>&nbsp;&nbsp;&nbsp;--datadir=/usr/share/bison
		 &amp;&amp;</userinput>
	<userinput>make &amp;&amp;</userinput>
	<userinput>make install</userinput>

</literallayout></blockquote>

<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 yacc script 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>

<literallayout>

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

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

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

</literallayout>

</sect2>