OPERATING SYSTEMSOS Linux

How to Compile & Run LEX and YACC programs on UBUNTU by Dr. Mahesh Huddar

How to Compile & Run LEX and YACC programs on UBUNTU by Dr. Mahesh Huddar

Run the following commands on terminal:
sudo apt-get update
sudo apt-get intall flex
sudo apt-get intall byacc
sudo apt-get intall bison
sudo apt-get intall bison++
sudo apt-get intall byacc-j

Compiling and Running LEX Programs:
flex hello.l
gcc lex.yy.c
./a.out

Compiling and Running YACC Programs:
flex hello.l
bison -d hello.y
gcc lex.yy.c y.tab.c
./a.out

********************************

1. Blog / Website: https://www.vtupulse.com/
2. Like Facebook Page: https://www.facebook.com/VTUPulse
3. Follow us on Instagram: https://www.instagram.com/vtupulse/
4. Like, Share, Subscribe, and Don’t forget to press the bell ICON for regular updates

source

ubuntu

5 thoughts on “How to Compile & Run LEX and YACC programs on UBUNTU by Dr. Mahesh Huddar

Comments are closed.