🍺 BREW Explorer

← all formulae

bnfc

brew install bnfc v2.9.6.3 BSD-3-Clause

BNF Converter

9
30-day installs · #8889
47
90-day · #7527
235
365-day · #6961
624
★ GitHub stars · updated 3mo ago

Runtime dependencies

gmp

Build dependencies

GitHub topics

abstract-syntax-tree bnf bnf-converter bnfc grammar-specification lexer-generator parser-generator pretty-print

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "cabal-install",
    "ghc",
    "sphinx-doc"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "gmp"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "BNF Converter",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:35:55+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "bnfc",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-05-08T20:58:50Z",
  "github_readme_excerpt": "[![Hackage version](https://img.shields.io/hackage/v/BNFC.svg?label=Hackage)](http://hackage.haskell.org/package/BNFC) \u003c!-- [![Hackage CI](https://matrix.hackage.haskell.org/api/v2/packages/BNFC/badge)](https://matrix.hackage.haskell.org/package/BNFC) --\u003e\n[![BNFC on Stackage Nightly](https://stackage.org/package/BNFC/badge/nightly)](https://stackage.org/nightly/package/BNFC)\n[![Stackage LTS version](https://www.stackage.org/package/BNFC/badge/lts?label=Stackage)](https://www.stackage.org/package/BNFC)\n[![Build status](https://github.com/BNFC/bnfc/workflows/Haskell-CI/badge.svg)](https://github.com/BNFC/bnfc/actions)\n[![Documentation status](https://readthedocs.org/projects/bnfc/badge/?version=latest)](http://bnfc.readthedocs.io/en/latest/?badge=latest)\n\nThe BNF Converter\n=================\n\nWhat is the BNF Converter?\n--------------------------\n\nThe BNF Converter (bnfc) is a compiler construction tool generating a compiler\nfront-end from a Labelled BNF (LBNF) grammar. It is currently able to generate Haskell,\nAgda, C, C++, Java, and OCaml, as well as XML representations.\n\nGiven a LBNF grammar the tool produces:\n- an abstract syntax implementation\n- a case skeleton for the abstract syntax in the same language\n- an Alex, Ocamllex, JLex, or Flex lexer generator file\n- a Happy, Ocamlyacc, Menhir, ANTLR, CUP, or Bison parser generator file\n- a pretty-printer as a Haskell/Agda/C/C++/Java/Ocaml module\n- a Latex file containing a readable specification of the language\n\n*More information*: http://bnfc.digitalgrammars.com/\n\nInstallation\n------------\n\nSome binaries are available at https://github.com/BNFC/bnfc/releases.\nInstallation from the Haskell sources is possible via `stack` or `cabal`.\n\n### Installation via stack (recommended)\n\nYou need a running installation of\n[stack](https://docs.haskellstack.org/en/stable/install_and_upgrade/).\nTo install and run the latest version of\n[bnfc from stackage](https://www.stackage.org/package/BNFC),\nenter at the command line:\n\n```\n  stack ",
  "github_repo": "BNFC/bnfc",
  "github_stars": 624,
  "github_topics": [
    "abstract-syntax-tree",
    "bnf",
    "bnf-converter",
    "bnfc",
    "grammar-specification",
    "lexer-generator",
    "parser-generator",
    "pretty-print"
  ],
  "homepage": "https://github.com/BNFC/bnfc",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 9,
  "installs_365d": 235,
  "installs_90d": 47,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "BSD-3-Clause",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "bnfc",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 8889,
  "rank_365d": 6961,
  "rank_90d": 7527,
  "raw_hash": "9ef25758293b9cf2",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/b/bnfc.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "cabal-install",
    "ghc",
    "agda",
    "antlr",
    "bison",
    "flex",
    "openjdk"
  ],
  "uses_from_macos": [
    "libffi"
  ],
  "version_head": "HEAD",
  "version_stable": "2.9.6.3",
  "versioned_formulae": [],
  "why_use_this": null
}