Installing Berkeley Yet Another Compiler Compiler (byacc) on Ubuntu Linux
This short tutorial shows you how to install Berkeley Yacc (byacc) on Ubuntu Linux Server. The process is very simple. For this tutorial, I'll be installing Berkeley Yacc (byacc) version 1.9. Linux kernel is 2.6.15-26-powerpc. I have used a Mac Mini (powerpc/ppc architecture). GCC version number is 4.0.3. Your configuration may be different from mine but the installation steps below should work fine for most configurations with little or no change at all (including other Linux distributions and even unixes e.g. MacOS X).
Berkeley Yacc (byacc):
According to invisible-island.net,
"Berkeley Yacc (byacc) is generally conceded to be the best yacc variant available. In contrast to bison, it is written to avoid dependencies upon a particular compiler."
Before starting, please check to see if there is a latest version available to download. Visit http://invisible-island.net/byacc/byacc.html to find out about the available versions. IMPORTANT: See "Configuring Ubuntu Linux After Installation" to install the development tools required to compile and install byacc from source code.
Steps to download, compile, and install are as follows. Note: Replace 20070509 with your version number:
Downloading Berkeley Yacc (byacc):Run command below,
Extracting files from the downloaded package:
tar -xvzf byacc.tar.gzNow, enter the directory where the package is extracted.
Configuring Berkeley Yacc (byacc):
./configure --prefix=/usr/local/byaccReplace "/usr/local/byacc" above with the directory path where you want to copy the files and folders. Note: check for any error message.
Compiling Berkeley Yacc (byacc):
Note: check for any error message.
Installing Berkeley Yacc (byacc):
As root (for privileges on destination directory), run the following.With sudo,
sudo make installWithout sudo,
Note: check for any error messages.
That’s it. Berkeley Yacc (byacc) has been successfully installed in the folder (/usr/local/byacc in our case) mentioned with --prefix switch during configuration.
Please feel free to use the comments form below if you have any questions or need more explanation on anything. Use the icons below to share this tutorial with your friends.