BNFC is the BNF Converter compiler construction tool which takes an annotated BNF (Backus-Naur Form) grammar and creates a parser from it.
The BNF Converter project is a tool similar to Yacc and ANTLR in that it takes a grammar specification written in BNF notation and generates a compiler that recognizes the language specified.
The Github site says:
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:
- an abstract syntax implementation
- a case skeleton for the abstract syntax in the same language
- an Alex, JLex, or Flex lexer generator file
- a Happy, CUP, or Bison parser generator file
- a pretty-printer as a Haskell/Java/C++/C module
- a Latex file containing a readable specification of the language
More information: https://bnfc.digitalgrammars.com/.