BNF Converter

Markus Forsberg and Aarne Ranta
  March 2005

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 was originally written to generate Haskell, but starting from Version 2.0, it can also be used for generating Java, C++, and C.

Given a Labelled BNF grammar the tool produces:

User manuals

Downloads

Source code: BNFC_2.2.tgz

Report on the LBNF formalism: LBNF-report.pdf LBNF-report.ps.gz

Example grammars

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

Earlier versions

v2.1 source code with examples: bnfc_2.1.tgz

v2.0 source code with examples: bnfc_2.0.tgz

v1.3 source code with examples: bnfc_1.3.tar

v1.0, source code with examples: bnf_conv.tgz

Authors

Björn Bringert, Paul Callaghan, Markus Forsberg, Peter Gammie, Patrik Jansson, Antti-Juhani Kaijanaho, Michael Pellauer, and Aarne Ranta.