An easy tutorial on installing lex and yacc tools on Ubuntu 6.10.
This is targeting an audience who would like to install the above compiler tools without having the aid of an ubuntu cd-rom , and for those who have not installed all the packages during installation.The lex and yacc are compiler construction tools and are referred to as "flex" and "bison" packages respectively for Ubuntu.
First and foremost to check if lex and yacc are already present on your Ubuntu , click on the terminal and type the following
galacticosfan@galacticosfan:~$ which lex
galacticosfan@galacticosfan:~$ which yacc
If lex and yacc are already present , you will be notified by a message
" /usr/bin/lex" and " /usr/bin/yacc".
If such messages are not received , it would indicate that the tools are absent.
Simple guidelines to install "flex" and "bison" for Ubuntu :
1. Go to System---->Administration----> Synaptic Package Manager
Search for the "flex" package.
Apply mark for installation and click on "Apply" on the toolbar in the Synaptic Package Manager.
Similarly search for "bison" and mark for installation as shown
On applying changes you would come across the following screen
On applying changes the Operating system sets up flex and bison.
Now to confirm that flex and bison have been setup , go to the
terminal and type "which lex" and "which yacc"
The /usr/bin/lex shows that the flex tool has been setup,showing the same for yacc as well.
Alternatively u can install the above tools by issue the following commands
galacticosfan@galacticosfan:~$ sudo apt-get install flex
galacticosfan@galacticosfan:~$ sudo apt-get install bison
The tools will be installed automatically .
12 comments:
good to know :P
it's not working.... server is bad
i am having some prob wit built in functions. . its giving error in yylex() function. . pls help
Thanks a lot bro.....
Its working...'
By using the above procedure, still I am not able to see flex and bison, kindly help
Kindly Help in installing Lex and yacc on ubuntu 9.04
for lex use "sudo apt-get install flex"
for yacc use "sudo apt-get install bison"
use terminal for the above commands and dont type inverted commas.............i think u all got answer
Thanks a lot Aditya!.......your presentation was amazing......even a child would hve understood....thanks again
thanks
thanks.
I do what do you explains very will but i have this two errors, can you help me please ?
W: Échec de la récupération de http://fr.archive.ubuntu.com/ubuntu/pool/main/m/m4/m4_1.4.13-2_i386.deb
404 Not Found
W: Échec de la récupération de http://fr.archive.ubuntu.com/ubuntu/pool/main/f/flex/flex_2.5.35-7ubuntu1_i386.deb
404 Not Found
m trying to install lex and yacc tool by cmdline but after typin sudo apt-get install lex or sudo apt-get install yacc
its showing as ,package,is not available and has no installation candidate.
could you tell me how to install
Post a Comment