bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bison 3.3.91 released [beta]


From: Akim Demaille
Subject: Bison 3.3.91 released [beta]
Date: Sun, 12 May 2019 14:31:21 +0200

Bison 3.4 is about to be released.  A particular focus was put on the
diagnostics, which are now colored by default.  Please, test/torture this
beta as much as possible on your pet projects.  I am especially interested
in feedback on the default colors for the diagnostics: be sure to install
libtextstyle before installing Bison, and please tell me if the default
colors work badly with your terminal.

See below for more NEWS.

Here are the compressed sources:
  https://alpha.gnu.org/gnu/bison/bison-3.3.91.tar.gz   (4.1MB)
  https://alpha.gnu.org/gnu/bison/bison-3.3.91.tar.xz   (3.1MB)

Here are the GPG detached signatures[*]:
  https://alpha.gnu.org/gnu/bison/bison-3.3.91.tar.gz.sig
  https://alpha.gnu.org/gnu/bison/bison-3.3.91.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify bison-3.3.91.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 0DDCAA3278D5264E

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.1
  Flex 2.6.4
  Gettext 0.19.8.1
  Gnulib v0.1-2564-g03752516b

NEWS

* Noteworthy changes in release 3.3.91 (2019-05-12) [beta]

** Bug fixes

  Portability issues were fixed.

* Noteworthy changes in release 3.3.90 (2019-04-28) [beta]

** New features

*** Colored diagnostics

  As an experimental feature, Bison now generates colored diagnostics,
  controlled by the new options --color and --style.

  Install the libtextstyle library before configuring Bison to use them.
  It is available from

    https://alpha.gnu.org/gnu/gettext/

  for instance

    https://alpha.gnu.org/gnu/gettext/libtextstyle-0.8.tar.gz

  The option --color supports the following arguments:
    - always, yes: Enable colors.
    - never, no: Disable colors.
    - auto, tty (default): Enable colors if the output device is a tty.

  To customize the styles, create a CSS file similar to

    /* black-and-white.css */
    .warning   { }
    .error     { font-weight: 800; text-decoration: underline; }
    .note      { }

  then invoke bison with --style=black-and-white.css.

*** Disabling output

  When given -fsyntax-only, the diagnostics are reported, but no output is
  generated.

  The name of this option is somewhat misleading as bison does more than
  just checking the syntax: every stage is run (including checking for
  conflicts for instance), except the generation of the output files.

*** Include the generated header (yacc.c)

  Before, when --defines is used, bison generated a header, and pasted an
  exact copy of it into the generated parser implementation file.  If the
  header name is not "y.tab.h", it is now #included instead of being
  duplicated.

  To use an '#include' even if the header name is "y.tab.h" (which is what
  happens with --yacc, or when using the Autotools' ylwrap), define
  api.header.include to the exact argument to pass to #include.  For
  instance:

    %define api.header.include {"parse.h"}

  or

    %define api.header.include {<parser/parse.h>}

*** api.location.type is now supported in C (yacc.c, glr.c)

  The %define variable api.location.type defines the name of the type to use
  for locations.  When defined, Bison no longer defines YYLTYPE.

  This can be used in programs with several parsers to factor their
  definition of locations: let one of them generate them, and the others
  just use them.

** Changes

*** Graphviz output

  In conformance with the recommendations of the Graphviz team, if %require
  "3.4" (or better) is specified, the option --graph generates a *.gv file
  by default, instead of *.dot.

*** Diagnostics overhaul

  Column numbers were wrong with multibyte characters, which would also
  result in skewed diagnostics with carets.  Beside, because we were
  indenting the quoted source with a single space, lines with tab characters
  were incorrectly underlined.

  To address these issues, and to be clearer, Bison now issues diagnostics
  as GCC9 does.  For instance it used to display (there's a tab before the
  opening brace):

    foo.y:3.37-38: error: $2 of ‘expr’ has no declared type
     expr: expr '+' "number"        { $$ = $1 + $2; }
                                         ^~
  It now reports

    foo.y:3.37-38: error: $2 of ‘expr’ has no declared type
        3 | expr: expr '+' "number" { $$ = $1 + $2; }
          |                                     ^~

  Other constructs now also have better locations, resulting in more precise
  diagnostics.

*** Fix-it hints for %empty

  Running Bison with -Wempty-rules and --update will remove incorrect %empty
  annotations, and add the missing ones.

*** Generated reports

  The format of the reports (parse.output) was improved for readability.

*** Better support for --no-line.

  When --no-line is used, the generated files are now cleaner: no lines are
  generated instead of empty lines.  Together with using api.header.include,
  that should help people saving the generated files into version control
  systems get smaller diffs.

** Documentation

  A new example in C shows an simple infix calculator with a hand-written
  scanner (examples/c/calc).

  A new example in C shows a reentrant parser (capable of recursive calls)
  built with Flex and Bison (examples/c/reccalc).

  There is a new section about the history of Yaccs and Bison.

** Bug fixes

  A few obscure bugs were fixed, including the second oldest (known) bug in
  Bison: it was there when Bison was entered in the RCS version control
  system, in December 1987.  See the NEWS of Bison 3.3 for the previous
  oldest bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]