BNF Converter

Language Technology Group
Department of Computer Science and Engineering
Chalmers University of Technology and University of Gothenburg

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 snapshot 2008-01-18:

Source repository

svn checkout https://svn.spraakdata.gu.se/clt/bnfc

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 - 2011.

License

Free software under GNU General Public License (GPL).