macOS
brew install flexlocal Homebrew formula metadata
sudo port install flexMacPorts ports tree · devel/flex/Portfile · 来源: api.github.com
安装
brew install flexlocal Homebrew formula metadata
sudo port install flexMacPorts ports tree · devel/flex/Portfile · 来源: api.github.com
sudo apk add flexAlpine Linux edge package indexes · flex · 来源: dl-cdn.alpinelinux.org
sudo dnf install flexFedora Rawhide package metadata · flex · 来源: dl.fedoraproject.org
nix profile install nixpkgs#flexnixpkgs package indexes · flex · 来源: raw.githubusercontent.com
sudo pacman -S flexArch Linux sync databases · flex · 来源: geo.mirror.pkgbuild.com
sudo zypper install flexopenSUSE Tumbleweed package metadata · flex · 来源: download.opensuse.org
概览
Fast Lexical Analyzer, generates Scanners (tokenizers)
历史
flex is the fast lexical analyzer generator, the long-running free-software successor in the lex family. It generates scanners for recognizing lexical patterns in text and remains a foundational build-time package for C, C++, parser, compiler, and language-tooling stacks.
The upstream README describes flex as a tool for generating scanners and notes that the code derives from software contributed to Berkeley by Vern Paxson. Its distribution includes user documentation, examples, tests, internationalization files, and libfl support.
The project moved its main codebase, issue tracking, pull requests, and source releases to GitHub during the 2.6.1 release cycle in 2016, after earlier SourceForge-era mailing-list infrastructure. The 2.6.x NEWS entries record modernization work around generated scanners, portability, cross compilation, tests, build tooling, and release artifacts.
flex is a standard dependency in Unix-like development environments because many source packages generate or ship scanners built from `.l` files. The supplied package metadata records availability across apk, Homebrew, Debian, Fedora, MacPorts, Nix, pacman, Ubuntu, and zypper, reflecting its role as a baseline developer tool rather than a niche application.
Users write lexical rules and run flex to generate C or C++ scanner code. The generated scanner is then compiled into a program, commonly alongside parser generators and build systems for compilers, interpreters, protocol tools, data importers, and other text-processing software.
Package maintainers care about whether a release tarball includes generated intermediate files, which flex version built the distributed scanner, and whether cross-compilation and bootstrap paths work. The official NEWS repeatedly calls out these build and portability concerns.
flex is one of the canonical examples of a package that is both a user-facing command and a build dependency. It shows up in dependency graphs far from compiler projects because scanner generation is a common prebuild step, and its own bootstrap story matters to source-based distributions.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
flex | cli | 全局可执行文件 | |
flex++ | cli | 全局可执行文件 | |
lex | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/westes/flex
安装元数据
| 软件包键 | brew:flex |
|---|---|
| 版本 | 2.6.4 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/flex |
| 主页 | https://github.com/westes/flex |
| 仓库 | https://github.com/westes/flex |
| 上游文档 | https://westes.github.io/flex/manual |
| 许可证 | BSD-2-Clause |
| 源码归档 | https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz |
| 最后更新 | 2026-06-22T14:03:20-07:00 |
| Pulse | updated |
| 依赖 | gettext |
| 构建依赖 | help2man |
| macOS 提供的库 | m4 |
| Bottle | 可用 (于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | flex |
| Version Scheme | 0 |
| Revision | 2 |
| Head Version | HEAD |
| Requirements |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
flex 2.6.4-8.2+b4
fast lexical analyzer generator
https://github.com/westes/flex
sudo apt install flexflex-doc 2.6.4-8.2
Documentation for flex (a fast lexical analyzer generator)
https://github.com/westes/flex
sudo apt install flex-doclibfl-dev 2.6.4-8.2+b4
static library for flex (a fast lexical analyzer generator)
https://github.com/westes/flex
sudo apt install libfl-devlibfl2 2.6.4-8.2+b4
SHARED library for flex (a fast lexical analyzer generator)
https://github.com/westes/flex
sudo apt install libfl2flex
nix profile install nixpkgs#flexflex 2.6.4-8.2build1
fast lexical analyzer generator
https://github.com/westes/flex
sudo apt install flexflex-doc 2.6.4-8.2build1
Documentation for flex (a fast lexical analyzer generator)
https://github.com/westes/flex
sudo apt install flex-doclibfl-dev 2.6.4-8.2build1
static library for flex (a fast lexical analyzer generator)
https://github.com/westes/flex
sudo apt install libfl-devlibfl2 2.6.4-8.2build1
SHARED library for flex (a fast lexical analyzer generator)
https://github.com/westes/flex
sudo apt install libfl2flex 2.6.4-r8
A tool for generating text-scanning programs
https://github.com/westes/flex
sudo apk add flexflex-dev 2.6.4-r8
A tool for generating text-scanning programs (development files)
https://github.com/westes/flex
sudo apk add flex-devflex-doc 2.6.4-r8
A tool for generating text-scanning programs (documentation)
https://github.com/westes/flex
sudo apk add flex-docflex-libs 2.6.4-r8
A tool for generating text-scanning programs (libraries)
https://github.com/westes/flex
sudo apk add flex-libsflex 2.6.4-24.fc44
A tool for generating scanners (text pattern recognizers)
https://github.com/westes/flex
sudo dnf install flexlibfl-devel 2.6.4-24.fc44
Development files for the flex scanner generator
https://github.com/westes/flex
sudo dnf install libfl-devellibfl-static 2.6.4-24.fc44
Static libraries for the flex scanner generator
https://github.com/westes/flex
sudo dnf install libfl-static来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.