flex

Install command:
brew install flex

Fast Lexical Analyzer, generates Scanners (tokenizers)

https://github.com/westes/flex

License: BSD-2-Clause

Development: Pull requests

Formula JSON API: /api/formula/flex.json

Formula code: flex.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 2.7.14
head ⚡️ HEAD

Keg-only because macOS already provides this software.

Depends on:

gettext 1.0 GNU internationalization (i18n) and localization (l10n) library

Depends on when building from source:

help2man 1.49.3 Automatically generate simple man pages

Uses from macOS: bison (build), m4

Requires: macOS

Binaries: flex, flex++, lex

GitHub Packages downloads:

Last 30 days150,607
Downloads4,100,021
Analytics install events (30 days)9,732
Downloads / install events (30 days)15.5×

Source: GitHub Packages, fetched 2026-12-01T01:09:12Z. Analytics dates: 2026-11-01 to 2026-12-01. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs9,72413,44740,836
Installs (--HEAD)8824
Installs on Request7,0388,96522,907
Installs on Request (--HEAD)8824
Build Errors1