Search code examples
visual-studio-2010compiler-constructionflex-lexer

Flex (lexical analizer) doesn't make the file lex.yy.c, why?


I'm trying to build a lexical analyzer (tokenizer) by flex on microsoft visual studio 2010, but it doesn't make the C-file (lex.yy.c) when I press Tools -> flex can any body help me?


Solution

  • Flex does not normally come as part of visual studio, so it must have been downloaded and added.

    The instructions for the addition of flex and bison with visual studio are here: http://sourceforge.net/p/winflexbison/wiki/Visual%20Studio%20custom%20build%20rules/

    Have your read that documentation. It shows you how to get it working.

    Many people find it easier to just use flex and bison in command prompt mode.