bison-inst.xml 875 B

123456789101112131415161718192021222324252627282930
  1. <sect2>
  2. <title>Installation of Bison</title>
  3. <para>Install Bison by running the following commands:</para>
  4. <para><screen><userinput>./configure --prefix=/usr \
  5. &nbsp;&nbsp;&nbsp;--datadir=/usr/share/bison &amp;&amp;
  6. make &amp;&amp;
  7. make install</userinput></screen></para>
  8. <para>Some programs don't know about bison and try to find the yacc program
  9. (bison is a (better) alternative for yacc). So to please those few
  10. programs out there we'll create a yacc script that calls bison and have
  11. it emulate yacc's output file name conventions.</para>
  12. <para>Create a new file <filename>/usr/bin/yacc</filename> by running the
  13. following:</para>
  14. <para><screen><userinput>cat &gt; /usr/bin/yacc &lt;&lt; "EOF"</userinput>
  15. #!/bin/sh
  16. # Begin /usr/bin/yacc
  17. exec /usr/bin/bison -y "$@"
  18. # End /usr/bin/yacc
  19. <userinput>EOF
  20. chmod 755 /usr/bin/yacc</userinput></screen></para>
  21. </sect2>