Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing flex (lexical analyzer) on Mac

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!

like image 937
user635064 Avatar asked Mar 07 '11 01:03

user635064


People also ask

Does Flex work on Mac?

AppleInsider may earn an affiliate commission on purchases made through links on our site. Google is rolling out ChromeOS Flex as an enterprise option to replace operating systems on old Macs and PCs, letting users turn their aging hardware into Chromebooks.

What is Flex GNU?

Flex is a fast lexical analyser generator. It is a tool for generating programs that perform pattern-matching on text. Flex is a non-GNU free implementation of the well known Lex program. The GNU Project did develop a manual for Flex.

Is flex a compiler?

flex is a tool for generating scanners: programs which recognize lexical patterns in text. flex reads the given input files (or its standard input if no file names are given) for a description of the scanner to generate. The description is in the form of pairs of regular expressions and C code, called rules .


2 Answers

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

brew install flex
like image 130
Pawandeep Singh Avatar answered Oct 12 '22 15:10

Pawandeep Singh


You can use macports to install flex

like image 38
ennuikiller Avatar answered Oct 12 '22 15:10

ennuikiller