Installing flex (lexical analyzer) on Mac

user635064 picture user635064 · Mar 7, 2011 · Viewed 20.6k times · Source

Can someone tell me how I can install flex (lexical analyzer) on my Mac? I searched everywhere on google and I can't find it. I have the 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!

Answer

Pawandeep Singh picture Pawandeep Singh · May 20, 2016

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

brew install flex