Professional Documents
Culture Documents
Guidelines For Installing and Executing Lex and Yacc Programs in Windows
Guidelines For Installing and Executing Lex and Yacc Programs in Windows
Step 1 : Download the setup for Flex (Lexical analyzer) and Bison (for Yacc) from Gnu Win Packages
After clicking on “Setup” you will get this page , Click on Save File
Repeat the same steps for Flex Package , Click on Set up
Click on Next
Important step : You see here “C:\Program files (x86)\GnuWin32” (Remove the Red color part) then
click on Next
Additional Icon (Remove tick mark from first check box), Click on Next
Click on Install
Click on Finish
Step – 3:
Step – 4:
Right click on “This PC” Properties Advance System Settings Environment Variable
Go to Path and Paste “C:\GnuWin32\bin” , Then Click OK
Step -5 : Take any sample Program written in lex in Desktop. (eg : 6a.l) Open cmd and follow below
mentioned process.
cd Desktop
you see after this command you will have lex.yy.c file
gcc lex.yy.c
a.exe