BNFC: A compiler front-end generator.

[ development, gpl, library, program ] [ Propose Tags ]

The BNF Converter is a compiler construction tool generating a compiler front-end from a Labelled BNF grammar. It was originally written to generate Haskell code, but can also be used for generating Agda, C, C++, C#, Java, Ocaml and XML code.

Given a Labelled BNF grammar the tool produces: an abstract syntax as a Haskell, Agda, C, C++, C#, Ocaml module or Java directory, a case skeleton for the abstract syntax in the same language, an Alex, JLex, or Flex lexer generator file, a Happy, CUP, Bison, or Antlr parser generator file, a pretty-printer as a Haskell, Agda, C, C++, C#, Java, or Ocaml module, an XML representation, a LaTeX file containing a readable specification of the language.

Versions [faq],,,, 2.5.0,,,,,,, 2.7.1, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4
Change log changelog
Dependencies array, base (>=4.8 && <5), containers, deepseq, directory, filepath, mtl (>=2.2.1), pretty (==1.1.*), process, semigroups, time [details]
License GPL-2.0-only
Copyright (c) Andreas Abel, Jonas Almström Duregård, Krasimir Angelov, Jean-Philippe Bernardy, Björn Bringert, Johan Broberg, Kyle Butt, Paul Callaghan, Grégoire Détrez, Markus Forsberg, Ola Frid, Peter Gammie, Thomas Hallgren, Pascal Hof, Simon Huber, Patrik Jansson, Kristofer Johannisson, Antti-Juhani Kaijanaho, Andreas Lööw, Justin Meiners, Kent Mein, Ulf Norell, Gabriele Paganelli, Michael Pellauer, Fabian Ruch, and Aarne Ranta 2002 - 2020. Free software under GNU General Public License (GPL).
Category Development
Home page
Bug tracker
Source repo head: git clone git://
this: git clone git:// v2.8.4)(source)
Uploaded by AndreasAbel at 2020-10-10T15:26:32Z
Distributions Arch:2.8.4, Debian:2.8.1, FreeBSD:2.8, NixOS:2.8.4
Executables bnfc
Downloads 18128 total (147 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-10-10 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees