This release adds the OCaml/Menhir backend, a variant of the OCaml backend that uses parser generator menhir
instead of ocamlyacc
. Beyond that, the focus of this release has been increased robustness and predictability of the BNFC tool:
--check
that only performs sanity checks on the given LBNF grammar file, without calling any backend (#286).define
now supported by all maintained backends (Agda, Haskell, Haskell/GADT, C, C++, Java).position token
now supported by all maintained backends with the exception of C++/NoSTL.The Haskell backend has seen the following improvements:
--text-token
to use Data.Text
instead of String
in the generated lexer (#167).IsString
instances for Ident
-like token types (#192).Err
monad is now defined as Either String
. Module ErrM
is only generated for backwards compatibility. Imports of ErrM
with an explicit import list may have to modified slightly, see a migration guide at the Haskell backend documentation.The C-family backends have been improved as follows:
Further bug fixes: #163, #169, #196, #212, #235, #256, #264, #269, #274, #276, #277, #279, #282, #283, #290.
Building of BNFC 2.8.4 requires GHC ≥ 7.10 and has been tested up to GHC 8.10.2. BNFC can be build using cabal
or stack
(using one of the enclosed stack-x.y.z.yaml
files).
/usr/local/bin/bnfc
compiled under Mac OS X Mojave, x86 64bit processorMac | BNFC-2.8.4-mac.pkg |
---|---|
Source | BNFC-2.8.4.tar.gz |
Win | bnfc-2.8.4-win.exe |