Hi Friend,
I was in search for a long time to get a platform in windows-7 to run lex and Yacc ,for academic purposes. Many of my friends also had the same problem and often forced to choose Linux only for merely executing Lex & Yacc programs..!!!
At last, I found one solution and its my pleasure to share it with all of you.!! :)
Its very simple.You need to download two very small files.
You have to download two executable( i.e., .exe files). In total,its size may have about 370KB.
To download them click the links below.
Link 1: Flex
Link 2: Bison
Save both files in same place. ( I did in D: --> Flex)
Keep the lex program to be compiled also in same place.
Now open command prompt--> reach your directory through command prompt.
To compile, type command
flex <filename> (eg:- flex myflex.l)
If your program is error-free, lex.yy.c will be generated.
We can compile this C file with any C compiler available (eg: Turbo C)
and generate yy.lex.exe
Now just run yy.lex.exe. Its your lexical analyser..!!!
I hope this post was useful for you.!!
Please comment your feedback here.!!
Thank You.!! :)