bnfc
« Back to VersTracker
Description:
BNF Converter
Type: Formula  |  Latest Version: 2.9.6.1@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: parser-generator compiler bnf haskell development
Install: brew install bnfc
About:
BNFC is a compiler-compiler tool that generates an abstract syntax tree and a lexer/parser from an LBNF grammar file. It supports multiple target languages including Haskell, Java, C, and C++, significantly simplifying the development of language processors. Its main value is reducing the boilerplate code needed to build language frontends.
Key Features:
  • Generates lexers and parsers from LBNF grammar
  • Supports multiple target languages (Haskell, Java, C, C++)
  • Automatic construction of abstract syntax trees
  • Built-in support for layout and comments
Use Cases:
  • Creating domain-specific languages (DSLs)
  • Building compilers for educational or research languages
  • Implementing configuration file parsers
Alternatives:
  • Happy – Haskell parser generator, requires manual lexer integration
  • ANTLR – More complex, Java-based, supports more advanced grammar features
License: BSD-3-Clause
Dependencies: gmp
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 13, 2024 1:45am 1 VERSION_BUMP 35460aa7