Posts

Showing posts from October, 2009

How To Setup FLEX in MS Visual 2008

Image
I came to know about LEX and YACC when I was working in NEC Telecom Software Philippines that wasI think 2001 when Carlo my former colleague introduced me into it. He used it to parse the binary output (in file) to retrieve the groups of data to be translated into a human readable format. He used the LEX to create the parser. Since then I always wanted to know how he did that so that’s how I ended up with this e-book. First you need to download “flex-2.5.4a-1.exe” from the internet and install it. Make sure the environment path is set below after installation. Try to test FLEX by typing flex in command window like below sample, Now, try to create a simple LEX file and save it as “test.l” In the command type ” flex test.” l and this will create a “lex.yy.c “ file. Open your MS Visual Studio and create a empty C++ project. Add the”lex.yy.c” file in the source folder. Then in the project Tools\Options menu add the include file In the “Project\sample Properties” select “Linker\Input”