Installing LEX && YACC packages in Ubuntu

lexyacc
This article will tell you how to install LEX and YACC packages in your Ubuntu or any Linux based Operating system.

PREREQUISITES

  • A PC installed with Ubuntu or any Linux based OS.(You can also be running Ubuntu as a virtual machine using VMWare/VirtualBox in Windows OS.


  • A working internet connection. (connect your PC to the Internet before you begin).

STEPS:
#To run Lex programs (.l extension) you need to install either 'flex' or 'flex-old' package.
#To run Yacc programs (.y extension) you need to install 'bison' package.

  • Open the 'Terminal' in Linux OS by searching 'Terminal' in the search bar.
Step 1) To install Lex package:
Type the exact command (either of the two)

  • sudo apt-get install flex
  • sudo apt-get install flex-old
Type 'y' when it asks for confirmation (see image below)
Flex

Step 2) To install Yacc package:
Type the exact command
  • sudo apt-get install bison
Type 'y' when it asks for confirmation (see image below)
yacc


NOTE: You may face a 'Candidate Key not Found' Error while performing step 1 & 2.
solution for Candidate Key not Found error is updating the 'APT' database of Linux. Type this command:
  • sudo apt-get update
See image:
aptupdate

Once this gets completed, follow steps 1 & 2 for installing lex and Yacc packages.


That's it. Now you can execute Lex and Yacc programs in your Linux.

Comment below for any queries so that i can get back to you via replies. Cheers!

He is a simple passionate tech freak who himself is an engineering student at Canara Engineering college. He likes App Development, Web designing, Blogging, Youtubing, Debugging and also is a CodeGeek!

Sharing is sexy!

Related Articles

2 comments

Write comments
Unknown
AUTHOR
16 April 2017 at 20:20 delete

Thanks for this simple tutorial.

Reply
avatar
Anonymous
AUTHOR
30 March 2022 at 15:50 delete

Installing Lex And And Yacc Packages In Ubuntu
-
Codeshuffle >>>>> Download Now

>>>>> Download Full

Installing Lex And And Yacc Packages In Ubuntu
-
Codeshuffle >>>>> Download LINK

>>>>> Download Now

Installing Lex And And Yacc Packages In Ubuntu
-
Codeshuffle >>>>> Download Full

>>>>> Download LINK

Reply
avatar

Share your views about this article!