How to install LEX and YACC in Ubuntu
If you have programming experience in a UNIX environment, you have probably already come across Lex and YACC, or as Linux users know them, Flex and Bison. For those who didn’t know Flex is the implementation of the Lex program, and Bison is the GNU version of the YACC program. These programs are extremely useful for some tasks, so in today's article we will walk you through installing Lex and YACC on Linux. As an example, we will use the Ubuntu distribution.
Install LEX and YACC in Ubuntu
- Open a terminal. To do this, use the keyboard shortcut (Ctrl + Alt + T).
- To install Lex (Flex), use the command:
sudo apt install flex
sudo apt install bison
sudo apt install flex bison
Done, now you can use LEX and YACC for your tasks. Still have questions? Write to us in the comments.