BNF Converter

Björn Bringert, Markus Forsberg, and Aarne Ranta
  September 2010

News

What is the BNF Converter?

The BNF Converter is a compiler construction tool generating a compiler front-end from a Labelled BNF grammar. It is currently able to generate C, C++, C#, F#, Haskell, Java, and OCaml, as well as XML representations.

Given a Labelled BNF grammar the tool produces:

User manuals

Download

Install BNFC from Hackage:

cabal install bnfc

Darcs repository (old) :

darcs get --partial http://code.haskell.org/bnfc/

Darcs snapshot 18/1/2008:

Large examples

A grammar of C. An example C file parsable in type Program.

A grammar of Alfa (For more details, see the Alfa home page.)

A grammar of LBNF. It is at the same time an example LBNF file, parsable in type Grammar. This grammar is used in the implementation of the BNF Converter.

A grammar of Java 1.1 developed by Mike Rainey

Authors

(c) Bjorn Bringert, Johan Broberg, Paul Callaghan, Markus Forsberg, Ola Frid, Peter Gammie, Patrik Jansson, Kristofer Johannisson, Antti-Juhani Kaijanaho, Ulf Norell, Michael Pellauer and Aarne Ranta 2002 - 2008.

License

Free software under GNU General Public License (GPL).