./devel/bison, GNU yacc(1) replacement

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 3.2.4, Package name: bison-3.2.4, Maintainer: pkgsrc-users

Bison is the GNU replacement for yacc(1). Some programs depend on
extensions present in Bison.


Required to run:
[devel/m4]

Required to build:
[pkgtools/cwrappers]

Master sites: (Expand)

SHA1: 950c7fa571677828eab963126b93a4ed9d496b74
RMD160: 901b1c5357009604983d002c55d48d09ab750884
Filesize: 2045.477 KB

Version history: (Expand)


CVS history: (Expand)


   2019-02-13 21:05:14 by Thomas Klausner | Files touched by this commit (4) | Package updated
Log message:
bison: update to 3.2.4.

* Noteworthy changes in release 3.2.4 (2018-12-24) [stable]

** Bug fixes

  Fix the move constructor of symbol_type.

  Always provide a copy constructor for symbol_type, even in modern C++.

* Noteworthy changes in release 3.2.3 (2018-12-18) [stable]

** Bug fixes

  Properly support token constructors in C++ with types that include commas
  (e.g., std::pair<int, int>).  A regression introduced in Bison 3.2.

* Noteworthy changes in release 3.2.2 (2018-11-21) [stable]

** Bug fixes

  C++ portability issues.

* Noteworthy changes in release 3.2.1 (2018-11-09) [stable]

** Bug fixes

  Several portability issues have been fixed in the build system, in the
  test suite, and in the generated parsers in C++.

* Noteworthy changes in release 3.2 (2018-10-29) [stable]

** Backward incompatible changes

  Support for DJGPP, which have been unmaintained and untested for years, is
  obsolete.  Unless there is activity to revive it, it will be removed.

** Changes

  %printers should use yyo rather than yyoutput to denote the output stream.

  Variant-based symbols in C++ should use emplace() rather than build().

  In C++ parsers, parser::operator() is now a synonym for the parser::parse.

** Documentation

  A new section, "A Simple C++ Example", is a tutorial for parsers in C++.

  A comment in the generated code now emphasizes that users should not
  depend upon non-documented implementation details, such as macros starting
  with YY_.

** New features

*** C++: Support for move semantics (lalr1.cc)

  The lalr1.cc skeleton now fully supports C++ move semantics, while
  maintaining compatibility with C++98.  You may now store move-only types
  when using Bison's variants.  For instance:

    %code {
      #include <memory>
      #include <vector>
    }

    %skeleton "lalr1.cc"
    %define api.value.type variant

    %%

    %token <int> INT "int";
    %type <std::unique_ptr<int>> int;
    %type <std::vector<std::unique_ptr<int>>> list;

    list:
      %empty    {}
    | list int  { $$ = std::move($1); $$.emplace_back(std::move($2)); }

    int: "int"  { $$ = std::make_unique<int>($1); }

*** C++: Implicit move of right-hand side values (lalr1.cc)

  In modern C++ (C++11 and later), you should always use 'std::move' with
  the values of the right-hand side symbols ($1, $2, etc.), as they will be
  popped from the stack anyway.  Using 'std::move' is mandatory for
  move-only types such as unique_ptr, and it provides a significant speedup
  for large types such as std::string, or std::vector, etc.

  If '%define api.value.automove' is set, every occurrence '$n' is replaced
  by 'std::move ($n)'.  The second rule in the previous grammar can be
  simplified to:

    list: list int  { $$ = $1; $$.emplace_back($2); }

  With automove enabled, the semantic values are no longer lvalues, so do
  not use the swap idiom:

    list: list int  { std::swap($$, $1); $$.emplace_back($2); }

  This idiom is anyway obsolete: it is preferable to move than to swap.

  A warning is issued when automove is enabled, and a value is used several
  times.

    input.yy:16.31-32: warning: multiple occurrences of $2 with \ 
api.value.automove enabled [-Wother]
    exp: "twice" exp   { $$ = $2 + $2; }
                                   ^^

  Enabling api.value.automove does not require support for modern C++.  The
  generated code is valid C++98/03, but will use copies instead of moves.

  The new examples/c++/variant-11.yy shows these features in action.

*** C++: The implicit default semantic action is always run

  When variants are enabled, the default action was not run, so

    exp: "number"

  was equivalent to

    exp: "number"  {}

  It now behaves like in all the other cases, as

    exp: "number"  { $$ = $1; }

  possibly using std::move if automove is enabled.

  We do not expect backward compatibility issues.  However, beware of
  forward compatibility issues: if you rely on default actions with
  variants, be sure to '%require "3.2"' to avoid older versions of Bison to
  generate incorrect parsers.

*** C++: Renaming location.hh

  When both %defines and %locations are enabled, Bison generates a
  location.hh file.  If you don't use locations outside of the parser, you
  may avoid its creation with:

    %define api.location.file none

  However this file is useful if, for instance, your parser builds an AST
  decorated with locations: you may use Bison's location independently of
  Bison's parser.  You can now give it another name, for instance:

    %define api.location.file "my-location.hh"

  This name can have directory components, and even be absolute.  The name
  under which the location file is included is controlled by
  api.location.include.

  This way it is possible to have several parsers share the same location
  file.

  For instance, in src/foo/parser.hh, generate the include/ast/loc.hh file:

    %locations
    %define api.namespace {foo}
    %define api.location.file "include/ast/loc.hh"
    %define api.location.include {<ast/loc.hh>}

  and use it in src/bar/parser.hh:

    %locations
    %define api.namespace {bar}
    %code requires {#include <ast/loc.hh>}
    %define api.location.type {bar::location}

  Absolute file names are supported, so in your Makefile, passing the flag
  -Dapi.location.file='"$(top_srcdir)/include/ast/location.hh"' to bison is
  safe.

*** C++: stack.hh and position.hh are deprecated

  When asked to generate a header file (%defines), the lalr1.cc skeleton
  generates a stack.hh file.  This file had no interest for users; it is now
  made useless: its content is included in the parser definition.  It is
  still generated for backward compatibility.

  When in addition to %defines, location support is requested (%locations),
  the file position.hh is also generated.  It is now also useless: its
  content is now included in location.hh.

  These files are no longer generated when your grammar file requires at
  least Bison 3.2 (%require "3.2").

** Bug fixes

  Portability issues on MinGW and VS2015.

  Portability issues in the test suite.

  Portability/warning issues with Flex.

* Noteworthy changes in release 3.1 (2018-08-27) [stable]

** Backward incompatible changes

  Compiling Bison now requires a C99 compiler---as announced during the
  release of Bison 3.0, five years ago.  Generated parsers do not require a
  C99 compiler.

  Support for DJGPP, which have been unmaintained and untested for years, is
  obsolete. Unless there is activity to revive it, the next release of Bison
  will have it removed.

** New features

*** Typed midrule actions

  Because their type is unknown to Bison, the values of midrule actions are
  not treated like the others: they don't have %printer and %destructor
  support.  It also prevents C++ (Bison) variants to handle them properly.

  Typed midrule actions address these issues.  Instead of:

    exp: { $<ival>$ = 1; } { $<ival>$ = 2; }   { $$ = $<ival>1 \ 
+ $<ival>2; }

  write:

    exp: <ival>{ $$ = 1; } <ival>{ $$ = 2; }   { $$ = $1 + $2; }

*** Reports include the type of the symbols

  The sections about terminal and nonterminal symbols of the '*.output' file
  now specify their declared type.  For instance, for:

    %token <ival> NUM

  the report now shows '<ival>':

    Terminals, with rules where they appear

    NUM <ival> (258) 5

*** Diagnostics about useless rules

  In the following grammar, the 'exp' nonterminal is trivially useless.  So,
  of course, its rules are useless too.

    %%
    input: '0' | exp
    exp: exp '+' exp | exp '-' exp | '(' exp ')'

  Previously all the useless rules were reported, including those whose
  left-hand side is the 'exp' nonterminal:

    warning: 1 nonterminal useless in grammar [-Wother]
    warning: 4 rules useless in grammar [-Wother]
    2.14-16: warning: nonterminal useless in grammar: exp [-Wother]
     input: '0' | exp
                  ^^^
    2.14-16: warning: rule useless in grammar [-Wother]
     input: '0' | exp
                  ^^^
    3.6-16: warning: rule useless in grammar [-Wother]
     exp: exp '+' exp | exp '-' exp | '(' exp ')'
          ^^^^^^^^^^^
    3.20-30: warning: rule useless in grammar [-Wother]
     exp: exp '+' exp | exp '-' exp | '(' exp ')'
                        ^^^^^^^^^^^
    3.34-44: warning: rule useless in grammar [-Wother]
     exp: exp '+' exp | exp '-' exp | '(' exp ')'
                                      ^^^^^^^^^^^

  Now, rules whose left-hand side symbol is useless are no longer reported
  as useless.  The locations of the errors have also been adjusted to point
  to the first use of the nonterminal as a left-hand side of a rule:

    warning: 1 nonterminal useless in grammar [-Wother]
    warning: 4 rules useless in grammar [-Wother]
    3.1-3: warning: nonterminal useless in grammar: exp [-Wother]
     exp: exp '+' exp | exp '-' exp | '(' exp ')'
     ^^^
    2.14-16: warning: rule useless in grammar [-Wother]
     input: '0' | exp
                  ^^^

*** C++: Generated parsers can be compiled with -fno-exceptions (lalr1.cc)

  When compiled with exceptions disabled, the generated parsers no longer
  uses try/catch clauses.

  Currently only GCC and Clang are supported.

** Documentation

*** A demonstration of variants

  A new example was added (installed in .../share/doc/bison/examples),
  'variant.yy', which shows how to use (Bison) variants in C++.

  The other examples were made nicer to read.

*** Some features are no longer 'experimental'

  The following features, mature enough, are no longer flagged as
  experimental in the documentation: push parsers, default %printer and
  %destructor (typed: <*> and untyped: <>), %define api.value.type \ 
union and
  variant, Java parsers, XML output, LR family (lr, ielr, lalr), and
  semantic predicates (%?).

** Bug fixes

*** GLR: Predicates support broken by #line directives

  Predicates (%?) in GLR such as

    widget:
      %? {new_syntax} 'w' id new_args
    | %?{!new_syntax} 'w' id old_args

  were issued with #lines in the middle of C code.

*** Printer and destructor with broken #line directives

  The #line directives were not properly escaped when emitting the code for
  %printer/%destructor, which resulted in compiler errors if there are
  backslashes or double-quotes in the grammar file name.

*** Portability on ICC

  The Intel compiler claims compatibility with GCC, yet rejects its _Pragma.
  Generated parsers now work around this.

*** Various

  There were several small fixes in the test suite and in the build system,
  many warnings in bison and in the generated parsers were eliminated.  The
  documentation also received its share of minor improvements.

  Useless code was removed from C++ parsers, and some of the generated
  constructors are more 'natural'.
   2019-01-22 04:20:41 by Ryo ONODERA | Files touched by this commit (6) | Package updated
Log message:
Update to 3.0.5

Changelog:
* Noteworthy changes in release 3.0.5 (2018-05-27) [stable]

** Bug fixes

*** C++: Fix support of 'syntax_error'

  One incorrect 'inline' resulted in linking errors about the constructor of
  the syntax_error exception.

*** C++: Fix warnings

  GCC 7.3 (with -O1 or -O2 but not -O0 or -O3) issued null-dereference
  warnings about yyformat being possibly null.  It also warned about the
  deprecated implicit definition of copy constructors when there's a
  user-defined (copy) assignment operator.

*** Location of errors

  In C++ parsers, out-of-bounds errors can happen when a rule with an empty
  ride-hand side raises a syntax error.  The behavior of the default parser
  (yacc.c) in such a condition was undefined.

  Now all the parsers match the behavior of glr.c: @$ is used as the
  location of the error.  This handles gracefully rules with and without
  rhs.

*** Portability fixes in the test suite

  On some platforms, some Java and/or C++ tests were failing.
   2019-01-16 01:19:32 by David H. Gutteridge | Files touched by this commit (2)
Log message:
devel/bison: add patches to fix building with glibc >= 2.27

Relates to PR pkg/53826, further details are provided there. This is a
temporary fix: the newest release of Bison addresses this by including
a newer version of gnulib. I'm applying this less obtrusive change for
now. No PKGREVISION, because there should be no change to existing
packages, it addresses build failures only.
   2018-08-22 11:48:07 by Thomas Klausner | Files touched by this commit (3558)
Log message:
Recursive bump for perl5-5.28.0
   2017-08-18 23:43:03 by Adam Ciarcinski | Files touched by this commit (2)
Log message:
Fix crash on macOS 10.13 (Darwin 7).
   2016-07-09 08:39:18 by Thomas Klausner | Files touched by this commit (1068) | Package updated
Log message:
Bump PKGREVISION for perl-5.24.0 for everything mentioning perl.
   2016-02-25 13:12:50 by Jonathan Perkin | Files touched by this commit (39)
Log message:
Use OPSYSVARS.
   2015-11-03 04:29:40 by Alistair G. Crooks | Files touched by this commit (1995)
Log message:
Add SHA512 digests for distfiles for devel category

Issues found with existing distfiles:
	distfiles/eclipse-sourceBuild-srcIncluded-3.0.1.zip
	distfiles/fortran-utils-1.1.tar.gz
	distfiles/ivykis-0.39.tar.gz
	distfiles/enum-1.11.tar.gz
	distfiles/pvs-3.2-libraries.tgz
	distfiles/pvs-3.2-linux.tgz
	distfiles/pvs-3.2-solaris.tgz
	distfiles/pvs-3.2-system.tgz
No changes made to these distinfo files.

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.