macOS
brew install bnfclocal Homebrew formula metadata
安装
brew install bnfclocal Homebrew formula metadata
sudo pacman -S bnfcArch Linux sync databases · bnfc · 来源: geo.mirror.pkgbuild.com
概览
BNF Converter
历史
BNFC, the BNF Converter, is a compiler-construction tool that turns a Labelled BNF grammar into a compiler front end: abstract syntax, lexer, parser, pretty-printer, test bench, and documentation.
BNFC started at Chalmers and the University of Gothenburg. A 2004 Haskell workshop demonstration by Markus Forsberg and Aarne Ranta says Forsberg and Ranta began development in 2002 as a tool generating Haskell.
The same source records that Michael Pellauer retargeted BNFC to C, C++, and Java in 2003, moving it from a Haskell-only generator toward a multilingual compiler-front-end generator.
Modern BNFC documentation describes the LBNF formalism independently of any one output language, and the project now advertises generation for Haskell, Agda, C, C++, Java, OCaml, XML representations, and Pygments syntax highlighters.
BNFC found adoption in programming-languages courses, research prototypes, and small language implementations where the grammar is the most stable artifact and hand-written front ends would be repetitive.
Its package-manager footprint is narrower than mainstream parser generators but meaningful: Homebrew, Debian/Ubuntu, Arch, and Haskell package ecosystems carry it for developers who want an executable generator rather than a library-only parser toolkit.
A user writes an LBNF grammar, runs bnfc, and then compiles the generated lexer/parser and abstract-syntax code with the target language's usual parser tooling, such as Alex and Happy for Haskell or Flex/Bison-style tools for C-family output.
BNFC is especially useful when the same grammar should produce both implementation artifacts and a readable language specification, keeping parser code, AST constructors, pretty printers, and documentation aligned.
BNFC is package-nerd-significant because it packages an academic compiler-construction idea as a practical command-line generator. It is not just yacc with another syntax; its labeled grammar rules become typed abstract syntax across target languages.
For language-tooling nerds, BNFC sits in the interesting space between parser generators, syntax-specification formalisms, and teaching tools. It makes a grammar file the source of truth for several generated artifacts that are otherwise easy to let drift.
Its long survival in package managers matters because many compiler-course and research tools depend on old but useful grammar generators being installable without reconstructing a Chalmers-era toolchain by hand.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
bnfc | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:bnfc |
|---|---|
| 版本 | 2.9.6.3 |
| 软件包管理器 | Homebrew |
| 主页 | https://github.com/BNFC/bnfc |
| 仓库 | https://github.com/BNFC/bnfc |
| 最后更新 | 2026-07-22T02:42:18Z |
| Pulse | updated |
| Bottle | 未记录 |
| 服务 | 未声明 |
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
bnfc 2.9.5-1
Compiler front-end generator based on Labelled BNF
https://bnfc.digitalgrammars.com/
sudo apt install bnfcbnfc 2.9.5-1
Compiler front-end generator based on Labelled BNF
https://bnfc.digitalgrammars.com/
sudo apt install bnfcbnfc 2.9.6.3-35
A compiler front-end generator.
https://bnfc.digitalgrammars.com/
sudo pacman -S bnfc来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.