1) flex-2.5.4a-1.exe
2) bison-2.4.1-setup.exe
3) After that, do a full install in a directory of your preference without spaces in the name. I suggest
4) Also, consider installing Dev-CPP in the default directory (
5) After that, set the PATH variable to include the bin directories of
6) Open a prompt, cd to the directory where your ".l" and ".y" are, and compile them with:
2) bison-2.4.1-setup.exe
3) After that, do a full install in a directory of your preference without spaces in the name. I suggest
C:\GnuWin32
. Do not install it in the default (C:\Program Files (x86)\GnuWin32) because bison has problems with spaces in directory names, not to say parenthesis.4) Also, consider installing Dev-CPP in the default directory (
C:\Dev-Cpp
)5) After that, set the PATH variable to include the bin directories of
gcc
(in C:\Dev-Cpp\bin
) and flex\bison
(in C:\GnuWin32\bin
). To do that, copy this: ;C:\Dev-Cpp\bin;C:\GnuWin32\bin
and append it to the end of the PATH
variable, defined in the place show by this figure:6) Open a prompt, cd to the directory where your ".l" and ".y" are, and compile them with:
flex hello.l
bison -dy hello.y
gcc lex.yy.c y.tab.c -o hello.exe
Nicely Explained...! Thanks.
ReplyDelete