BNF Converter
String
and Char
literals [#449]String
and Char
literals in parser (needs Java ≥ 15) [#451]C
[#455]jflex
≥ 1.8 [#453]ComposOp.hs
no longer needs mtl
library [#438]}
[#439]Char
[#452]let rec
in the printers for token categoriesTested GHC versions:
cabal
, GHC 7.10 - 9.6stack
, GHC 8.2 - 9.6columns
by @ivanperez-keera in https://github.com/BNFC/bnfc/pull/442
Full Changelog: https://github.com/BNFC/bnfc/compare/v2.9.4.1...v2.9.5
--functor
[#405]size_t
and -Wsign-conversion
[#391]--line-numbers
[#390], regression in 2.9.2 by [#349].valueOf()
instead of deprecated new
L()
for literal classes L [#402]define
Contributors:
stdio.h
in parser header files [#381]#include <algorithm>
[#377]64bit binaries for Linux, macOS, and Windows below.
stdio.h
in parser header files [#381]#include <algorithm>
[#377]64bit binaries for Linux, macOS, and Windows below.
free_*
and clone_*
to deallocate and clone syntax trees [#348][Char]
correctly, removed method prtList
[#359]define
d constructors from Skeleton.c
define
d constructors now reside in Absyn
[#287]define
d constructor now reside in AbsynDef.java
[#287]define
d constructorsdefine
d constructors involving list expressions work now [#363]_SYMB_nnn
, more readable token names in lexer & parser--functor
option now produces position-annotated ASTs [#176,#327]. Thanks @Commelina!Makefile
and test parser for --glr
mode [#340]Prelude
explicitly, compatible with {-# LANGUAGE NoImplicitPrelude #-}
define
expressions [#338]delimiters
pragma [#308]--alex1
, --alex2
, --sharestrings
, --profile
, and --cnf
[#265]entrypoints
pragma [#306]strdup
is not part of C89 standard, _POSIX_C_SOURCE
required [#318]String
literal lexer [#316]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).
Main new feature:
Backend-independent features:
.yaml
files [#198]\r
(carriage return) and \f
(form feed) in token declaration [#257]Foo2
) independent of coercions [#210]C backend:
-l
option to give error locations [#238]Haskell backend:
Makefile
that invokes bnfc
on changed .cf
fileOverlappingInstances
[#233]--cnf
: fixed problem with Any
type in generated code [#216]--cnf
: generated test program now same name (Test
) as without --cnf
--glr
: correct module header in .y file [#252]Binaries (see below):