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.
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.
Install macports and do:
$ sudo port install flex bison
However you might need to rig-up the /Developer
directory using a symbolic link first:
$ sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer
(There is no longer any need to rig-up anything).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With