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.6.5
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 days117,813
Downloads3,988,020
Analytics install events (30 days)2,473
Downloads / install events (30 days)47.6×

Source: GitHub Packages, fetched 2026-11-11T00:52:53Z. Analytics dates: 2026-10-12 to 2026-11-11. 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
Installs2,4735,80733,011
Installs (--HEAD)0118
Installs on Request1,3052,79716,940
Installs on Request (--HEAD)0118
Build Errors0