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.!! :)
23 comments :
There are fresh versions of Flex and Bison for windows platform at http://sourceforge.net/projects/winflexbison/ You can try it.
osum man!! \m/
@Arjun
thank u Arjun..!! I hope it was useful 4 u..!!
thanks for the information. it helps :)
Nice to know that.....:)
Hello sir,
ur blog is really very helpful...!!!
sir am working on Parallelization in C compiler which uses lex and yacc...!!
so need some little help from ur side..... would be very nice of u...!!
i'm not able to compile the lex.yy.c file...it is showing some warnings....what should i do nw?,...
Same here...
pls helpp
having linker error while trying to execute the c file using tc
hey!when i execute counter.l cmd is showing
D:\flex\flex counter.l
flex:can't open ounter.l
Linker error..................
how to compile yacc programs
@Amrutesh M Mahadev
Same question dude..
how to generate lex.yy.exe ??
Wow! I was searching for this of software to run yacc programs at home.
Please update your link for FLEX and BISON.Now,longer it is not available. After opening the link,webpage says "Object not Found!!!"
Update your blog details ASAP..
link not working
how to compile and run yacc program in telnet?
Very useful
hmm.. acha.. theek hai..
flex cant open my lex file?? what shall i do??
my laptop is windows 10 yaar,i could not able to download,plsss help me out
Post a Comment