If your lex input file doesnt have any errors, a file name “lex.yy.c” will be generated.ĥ. Reach your directory through command prompt.Ĥ. Create a lex program and save it(like ‘x.l’ or ‘x.txt’)Ģ. I believe everyone who has reached compiler level programming will have a c/c++ compiler installed in their system(duh!).ġ.
(Sorry for the trouble guys!!! The link is now corrected)Īnother requirement is that you must have a c/c++ compiler(like Turbo C++ ) installed in your system. Students in my college install a whole Linux. For Windows users, both bison and flex are included in the Cygwin Linux. If not, flex and bison both use the standard GNU build process, so to install them. All the files should be in the same directory(flex.exe is standalone but bison.exe is not). To begin with, you must download the files below first(around 400KB in total). Why do it the geeky Linux way if it can be done under Windows? Also, why waste your hard disk space and time(for loading the Linux OS) to do such a simple task. Students in my college install a whole Linux operating system to do their compiler lab practices.
This post is for all those guys and babes out there who could’nt figure out how to compile their lex and yacc programs in windows.