Install flex (lexical analyzer) on Mac

Can someone tell me how can I install flex (lexical analyzer) on my Mac? I searched everywhere on google and I cannot find it. I have a universal binary and I extracted it to my desktop, but I have no idea where to go from here. Any help would be greatly appreciated!

+6
c flex-lexer macos lexical-analysis
source share
5 answers

You can use macports to install flex

+4
source share

You can always install from source. Download the tarball from the flex site , extract it, cd to the directory where you extracted it, and do the following:

./configure make make install make clean 

Assuming you have make and a C compiler on your Mac, and I believe that all Macs have.

+4
source share

Try using Homebrew (package manager for Mac) and use the following command: -

 brew install flex 
+3
source share

Flex comes with xCode command line tools; you only need to install them through xcode> preferences> downloads> command line tools. This also includes gcc (Clang).

+2
source share

This information can help someone save time:

Only today I tried to install FLEX 2.5.39 from sources. Make-fail.

After some thoughts, I decided to try the old archives. 2.5.38 - failure 2.5.37 - OK

It seems now () = 2015-03-15, macport also uses build 2.5.37.

0
source share

All Articles