Flex and Bison on Mac OS X Lion with Xcode 4.3.2

c, compiler-construction, flex-lexer, xcode4.3

Solution

Flex and bison are also included with the optional Command-Line Tools download for Xcode 4.3. See instructions at https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html on how to install this. They end up installed in /usr/bin.

You may prefer getting them via port as trojanfoe suggested, since this gets you newer versions.

Problem

I want to develop my own C compiler to get deeper into flex and bison for my compiler lessons at University, but I can't find flex and bison, which I've seen described in some other posts. Do I need to install extra packages for Xcode or is there any other way? I'm running Mac OS X Lion and have Xcode 4.3.2.

Original source