Tue Jul 12 14:12:13 2011 UTC ()
Update to 2.5:

* Changes in version 2.5 (2011-05-14):

** Grammar symbol names can now contain non-initial dashes:

  Consistently with directives (such as %error-verbose) and with
  %define variables (e.g. push-pull), grammar symbol names may contain
  dashes in any position except the beginning.  This is a GNU
  extension over POSIX Yacc.  Thus, use of this extension is reported
  by -Wyacc and rejected in Yacc mode (--yacc).

** Named references:

  Historically, Yacc and Bison have supported positional references
  ($n, $$) to allow access to symbol values from inside of semantic
  actions code.

  Starting from this version, Bison can also accept named references.
  When no ambiguity is possible, original symbol names may be used
  as named references:

    if_stmt : "if" cond_expr "then" then_stmt ';'
    { $if_stmt = mk_if_stmt($cond_expr, $then_stmt); }

  In the more common case, explicit names may be declared:

    stmt[res] : "if" expr[cond] "then" stmt[then] "else" stmt[else] ';'
    { $res = mk_if_stmt($cond, $then, $else); }

  Location information is also accessible using @name syntax.  When
  accessing symbol names containing dots or dashes, explicit bracketing
  ($[sym.1]) must be used.

  These features are experimental in this version.  More user feedback
  will help to stabilize them.

** IELR(1) and canonical LR(1):

  IELR(1) is a minimal LR(1) parser table generation algorithm.  That
  is, given any context-free grammar, IELR(1) generates parser tables
  with the full language-recognition power of canonical LR(1) but with
  nearly the same number of parser states as LALR(1).  This reduction
  in parser states is often an order of magnitude.  More importantly,
  because canonical LR(1)'s extra parser states may contain duplicate
  conflicts in the case of non-LR(1) grammars, the number of conflicts
  for IELR(1) is often an order of magnitude less as well.  This can
  significantly reduce the complexity of developing of a grammar.

  Bison can now generate IELR(1) and canonical LR(1) parser tables in
  place of its traditional LALR(1) parser tables, which remain the
  default.  You can specify the type of parser tables in the grammar
  file with these directives:

    %define lr.type lalr
    %define lr.type ielr
    %define lr.type canonical-lr

  The default-reduction optimization in the parser tables can also be
  adjusted using `%define lr.default-reductions'.  For details on both
  of these features, see the new section `Tuning LR' in the Bison
  manual.

  These features are experimental.  More user feedback will help to
  stabilize them.

** LAC (Lookahead Correction) for syntax error handling:

  Canonical LR, IELR, and LALR can suffer from a couple of problems
  upon encountering a syntax error.  First, the parser might perform
  additional parser stack reductions before discovering the syntax
  error.  Such reductions can perform user semantic actions that are
  unexpected because they are based on an invalid token, and they
  cause error recovery to begin in a different syntactic context than
  the one in which the invalid token was encountered.  Second, when
  verbose error messages are enabled (with %error-verbose or the
  obsolete `#define YYERROR_VERBOSE'), the expected token list in the
  syntax error message can both contain invalid tokens and omit valid
  tokens.

  The culprits for the above problems are %nonassoc, default
  reductions in inconsistent states, and parser state merging.  Thus,
  IELR and LALR suffer the most.  Canonical LR can suffer only if
  %nonassoc is used or if default reductions are enabled for
  inconsistent states.

  LAC is a new mechanism within the parsing algorithm that solves
  these problems for canonical LR, IELR, and LALR without sacrificing
  %nonassoc, default reductions, or state merging.  When LAC is in
  use, canonical LR and IELR behave almost exactly the same for both
  syntactically acceptable and syntactically unacceptable input.
  While LALR still does not support the full language-recognition
  power of canonical LR and IELR, LAC at least enables LALR's syntax
  error handling to correctly reflect LALR's language-recognition
  power.

  Currently, LAC is only supported for deterministic parsers in C.
  You can enable LAC with the following directive:

    %define parse.lac full

  See the new section `LAC' in the Bison manual for additional
  details including a few caveats.

  LAC is an experimental feature.  More user feedback will help to
  stabilize it.

** %define improvements:

*** Can now be invoked via the command line:

  Each of these command-line options

    -D NAME[=VALUE]
    --define=NAME[=VALUE]

    -F NAME[=VALUE]
    --force-define=NAME[=VALUE]

  is equivalent to this grammar file declaration

    %define NAME ["VALUE"]

  except that the manner in which Bison processes multiple definitions
  for the same NAME differs.  Most importantly, -F and --force-define
  quietly override %define, but -D and --define do not.  For further
  details, see the section `Bison Options' in the Bison manual.

*** Variables renamed:

  The following %define variables

    api.push_pull
    lr.keep_unreachable_states

  have been renamed to

    api.push-pull
    lr.keep-unreachable-states

  The old names are now deprecated but will be maintained indefinitely
  for backward compatibility.

*** Values no longer need to be quoted in the grammar file:

  If a %define value is an identifier, it no longer needs to be placed
  within quotations marks.  For example,

    %define api.push-pull "push"

  can be rewritten as

    %define api.push-pull push

*** Unrecognized variables are now errors not warnings.

*** Multiple invocations for any variable is now an error not a warning.

** Unrecognized %code qualifiers are now errors not warnings.

** Character literals not of length one:

  Previously, Bison quietly converted all character literals to length
  one.  For example, without warning, Bison interpreted the operators in
  the following grammar to be the same token:

    exp: exp '++'
       | exp '+' exp
       ;

  Bison now warns when a character literal is not of length one.  In
  some future release, Bison will start reporting an error instead.

** Destructor calls fixed for lookaheads altered in semantic actions:

  Previously for deterministic parsers in C, if a user semantic action
  altered yychar, the parser in some cases used the old yychar value to
  determine which destructor to call for the lookahead upon a syntax
  error or upon parser return.  This bug has been fixed.

** C++ parsers use YYRHSLOC:

  Similarly to the C parsers, the C++ parsers now define the YYRHSLOC
  macro and use it in the default YYLLOC_DEFAULT.  You are encouraged
  to use it.  If, for instance, your location structure has `first'
  and `last' members, instead of

      # define YYLLOC_DEFAULT(Current, Rhs, N)                             \
        do                                                                 \
          if (N)                                                           \
            {                                                              \
              (Current).first = (Rhs)[1].location.first;                   \
              (Current).last  = (Rhs)[N].location.last;                    \
            }                                                              \
          else                                                             \
            {                                                              \
              (Current).first = (Current).last = (Rhs)[0].location.last;   \
            }                                                              \
        while (false)

  use:

      # define YYLLOC_DEFAULT(Current, Rhs, N)                             \
        do                                                                 \
          if (N)                                                           \
            {                                                              \
              (Current).first = YYRHSLOC (Rhs, 1).first;                   \
              (Current).last  = YYRHSLOC (Rhs, N).last;                    \
            }                                                              \
          else                                                             \
            {                                                              \
              (Current).first = (Current).last = YYRHSLOC (Rhs, 0).last;   \
            }                                                              \
        while (false)

** YYLLOC_DEFAULT in C++:

  The default implementation of YYLLOC_DEFAULT used to be issued in
  the header file.  It is now output in the implementation file, after
  the user %code sections so that its #ifndef guard does not try to
  override the user's YYLLOC_DEFAULT if provided.

** YYFAIL now produces warnings and Java parsers no longer implement it:

  YYFAIL has existed for many years as an undocumented feature of
  deterministic parsers in C generated by Bison.  More recently, it was
  a documented feature of Bison's experimental Java parsers.  As
  promised in Bison 2.4.2's NEWS entry, any appearance of YYFAIL in a
  semantic action now produces a deprecation warning, and Java parsers
  no longer implement YYFAIL at all.  For further details, including a
  discussion of how to suppress C preprocessor warnings about YYFAIL
  being unused, see the Bison 2.4.2 NEWS entry.

** Temporary hack for adding a semicolon to the user action:

  Previously, Bison appended a semicolon to every user action for
  reductions when the output language defaulted to C (specifically, when
  neither %yacc, %language, %skeleton, or equivalent command-line
  options were specified).  This allowed actions such as

    exp: exp "+" exp { $$ = $1 + $3 };

  instead of

    exp: exp "+" exp { $$ = $1 + $3; };

  As a first step in removing this misfeature, Bison now issues a
  warning when it appends a semicolon.  Moreover, in cases where Bison
  cannot easily determine whether a semicolon is needed (for example, an
  action ending with a cpp directive or a braced compound initializer),
  it no longer appends one.  Thus, the C compiler might now complain
  about a missing semicolon where it did not before.  Future releases of
  Bison will cease to append semicolons entirely.

** Verbose syntax error message fixes:

  When %error-verbose or the obsolete `#define YYERROR_VERBOSE' is
  specified, syntax error messages produced by the generated parser
  include the unexpected token as well as a list of expected tokens.
  The effect of %nonassoc on these verbose messages has been corrected
  in two ways, but a more complete fix requires LAC, described above:

*** When %nonassoc is used, there can exist parser states that accept no
    tokens, and so the parser does not always require a lookahead token
    in order to detect a syntax error.  Because no unexpected token or
    expected tokens can then be reported, the verbose syntax error
    message described above is suppressed, and the parser instead
    reports the simpler message, `syntax error'.  Previously, this
    suppression was sometimes erroneously triggered by %nonassoc when a
    lookahead was actually required.  Now verbose messages are
    suppressed only when all previous lookaheads have already been
    shifted or discarded.

*** Previously, the list of expected tokens erroneously included tokens
    that would actually induce a syntax error because conflicts for them
    were resolved with %nonassoc in the current parser state.  Such
    tokens are now properly omitted from the list.

*** Expected token lists are still often wrong due to state merging
    (from LALR or IELR) and default reductions, which can both add
    invalid tokens and subtract valid tokens.  Canonical LR almost
    completely fixes this problem by eliminating state merging and
    default reductions.  However, there is one minor problem left even
    when using canonical LR and even after the fixes above.  That is,
    if the resolution of a conflict with %nonassoc appears in a later
    parser state than the one at which some syntax error is
    discovered, the conflicted token is still erroneously included in
    the expected token list.  Bison's new LAC implementation,
    described above, eliminates this problem and the need for
    canonical LR.  However, LAC is still experimental and is disabled
    by default.

** Java skeleton fixes:

*** A location handling bug has been fixed.

*** The top element of each of the value stack and location stack is now
    cleared when popped so that it can be garbage collected.

*** Parser traces now print the top element of the stack.

** -W/--warnings fixes:

*** Bison now properly recognizes the `no-' versions of categories:

  For example, given the following command line, Bison now enables all
  warnings except warnings for incompatibilities with POSIX Yacc:

    bison -Wall,no-yacc gram.y

*** Bison now treats S/R and R/R conflicts like other warnings:

  Previously, conflict reports were independent of Bison's normal
  warning system.  Now, Bison recognizes the warning categories
  `conflicts-sr' and `conflicts-rr'.  This change has important
  consequences for the -W and --warnings command-line options.  For
  example:

    bison -Wno-conflicts-sr gram.y  # S/R conflicts not reported
    bison -Wno-conflicts-rr gram.y  # R/R conflicts not reported
    bison -Wnone            gram.y  # no conflicts are reported
    bison -Werror           gram.y  # any conflict is an error

  However, as before, if the %expect or %expect-rr directive is
  specified, an unexpected number of conflicts is an error, and an
  expected number of conflicts is not reported, so -W and --warning
  then have no effect on the conflict report.

*** The `none' category no longer disables a preceding `error':

  For example, for the following command line, Bison now reports
  errors instead of warnings for incompatibilities with POSIX Yacc:

    bison -Werror,none,yacc gram.y

*** The `none' category now disables all Bison warnings:

  Previously, the `none' category disabled only Bison warnings for
  which there existed a specific -W/--warning category.  However,
  given the following command line, Bison is now guaranteed to
  suppress all warnings:

    bison -Wnone gram.y

** Precedence directives can now assign token number 0:

  Since Bison 2.3b, which restored the ability of precedence
  directives to assign token numbers, doing so for token number 0 has
  produced an assertion failure.  For example:

    %left END 0

  This bug has been fixed.


(wiz)
diff -r1.76 -r1.77 pkgsrc/devel/bison/Makefile
diff -r1.20 -r1.21 pkgsrc/devel/bison/PLIST
diff -r1.25 -r1.26 pkgsrc/devel/bison/distinfo

cvs diff -r1.76 -r1.77 pkgsrc/devel/bison/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/bison/Makefile 2011/04/22 13:43:15 1.76
+++ pkgsrc/devel/bison/Makefile 2011/07/12 14:12:13 1.77
@@ -1,44 +1,44 @@ @@ -1,44 +1,44 @@
1# $NetBSD: Makefile,v 1.76 2011/04/22 13:43:15 obache Exp $ 1# $NetBSD: Makefile,v 1.77 2011/07/12 14:12:13 wiz Exp $
2 2
3DISTNAME= bison-2.4.3 3DISTNAME= bison-2.5
4PKGREVISION= 1 
5CATEGORIES= devel 4CATEGORIES= devel
6MASTER_SITES= ${MASTER_SITE_GNU:=bison/} 5MASTER_SITES= ${MASTER_SITE_GNU:=bison/}
7EXTRACT_SUFX= .tar.bz2 6EXTRACT_SUFX= .tar.bz2
8 7
9MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.gnu.org/software/bison/bison.html 9HOMEPAGE= http://www.gnu.org/software/bison/bison.html
11COMMENT= GNU yacc(1) replacement 10COMMENT= GNU yacc(1) replacement
12LICENSE= gnu-gpl-v3 11LICENSE= gnu-gpl-v3
13 12
14PKG_INSTALLATION_TYPES= overwrite pkgviews 13PKG_INSTALLATION_TYPES= overwrite pkgviews
15PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
16 15
17GNU_CONFIGURE= YES 16GNU_CONFIGURE= YES
18USE_LANGUAGES= c c++ 17USE_LANGUAGES= c c++
19USE_PKGLOCALEDIR= yes 18USE_PKGLOCALEDIR= yes
20USE_TOOLS+= grep gm4:run msgfmt 19USE_TOOLS+= grep gm4:run msgfmt
21INFO_FILES= # PLIST 20INFO_FILES= yes
22 21
23CONFIGURE_ENV+= gt_cv_func_gnugettext1_libintl=yes \ 22CONFIGURE_ENV+= gt_cv_func_gnugettext1_libintl=yes \
24 ac_cv_prog_M4=${TOOLS_PATH.gm4} 23 ac_cv_prog_M4=${TOOLS_PATH.gm4}
25 24
26TEST_TARGET= check 25TEST_TARGET= check
27 26
28# Avoid rebuilding manpage 27# Avoid rebuilding manpage
29pre-build: 28pre-build:
30 ${TOUCH} ${WRKSRC}/doc/bison.1 29 ${TOUCH} ${WRKSRC}/doc/bison.1
31 30
32# "bison" wants a recent version of "gettext" which at least NetBSD doesn't 31# "bison" wants a recent version of "gettext" which at least some
33# provide. Figure out whether it will install the locale files or not. 32# NetBSD versions don't provide. Figure out whether it will install
 33# the locale files or not.
34PLIST_SRC= ${WRKDIR}/PLIST 34PLIST_SRC= ${WRKDIR}/PLIST
35 35
36post-configure: 36post-configure:
37 if grep -q '^POSUB = po$$' ${WRKSRC}/Makefile; then \ 37 if grep -q '^POSUB = po$$' ${WRKSRC}/Makefile; then \
38 ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \ 38 ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \
39 else \ 39 else \
40 ${GREP} -v '^share/locale/' ${PKGDIR}/PLIST >${PLIST_SRC}; \ 40 ${GREP} -v '^share/locale/' ${PKGDIR}/PLIST >${PLIST_SRC}; \
41 fi 41 fi
42 42
43.include "../../devel/gettext-lib/buildlink3.mk" 43.include "../../devel/gettext-lib/buildlink3.mk"
44.include "../../mk/bsd.pkg.mk" 44.include "../../mk/bsd.pkg.mk"

cvs diff -r1.20 -r1.21 pkgsrc/devel/bison/PLIST (expand / switch to unified diff)

--- pkgsrc/devel/bison/PLIST 2010/05/02 10:41:52 1.20
+++ pkgsrc/devel/bison/PLIST 2011/07/12 14:12:13 1.21
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.20 2010/05/02 10:41:52 wiz Exp $ 1@comment $NetBSD: PLIST,v 1.21 2011/07/12 14:12:13 wiz Exp $
2bin/bison 2bin/bison
3info/bison.info 3info/bison.info
4lib/liby.a 4lib/liby.a
5man/man1/bison.1 5man/man1/bison.1
6man/man1/yacc.1 6man/man1/yacc.1
7share/aclocal/bison-i18n.m4 7share/aclocal/bison-i18n.m4
8share/bison/README 8share/bison/README
9share/bison/bison.m4 9share/bison/bison.m4
10share/bison/c++-skel.m4 10share/bison/c++-skel.m4
11share/bison/c++.m4 11share/bison/c++.m4
12share/bison/c-skel.m4 12share/bison/c-skel.m4
13share/bison/c.m4 13share/bison/c.m4
14share/bison/glr.c 14share/bison/glr.c
@@ -22,38 +22,41 @@ share/bison/m4sugar/foreach.m4 @@ -22,38 +22,41 @@ share/bison/m4sugar/foreach.m4
22share/bison/m4sugar/m4sugar.m4 22share/bison/m4sugar/m4sugar.m4
23share/bison/xslt/bison.xsl 23share/bison/xslt/bison.xsl
24share/bison/xslt/xml2dot.xsl 24share/bison/xslt/xml2dot.xsl
25share/bison/xslt/xml2text.xsl 25share/bison/xslt/xml2text.xsl
26share/bison/xslt/xml2xhtml.xsl 26share/bison/xslt/xml2xhtml.xsl
27share/bison/yacc.c 27share/bison/yacc.c
28share/locale/ast/LC_MESSAGES/bison-runtime.mo 28share/locale/ast/LC_MESSAGES/bison-runtime.mo
29share/locale/da/LC_MESSAGES/bison-runtime.mo 29share/locale/da/LC_MESSAGES/bison-runtime.mo
30share/locale/da/LC_MESSAGES/bison.mo 30share/locale/da/LC_MESSAGES/bison.mo
31share/locale/de/LC_MESSAGES/bison-runtime.mo 31share/locale/de/LC_MESSAGES/bison-runtime.mo
32share/locale/de/LC_MESSAGES/bison.mo 32share/locale/de/LC_MESSAGES/bison.mo
33share/locale/el/LC_MESSAGES/bison-runtime.mo 33share/locale/el/LC_MESSAGES/bison-runtime.mo
34share/locale/el/LC_MESSAGES/bison.mo 34share/locale/el/LC_MESSAGES/bison.mo
 35share/locale/eo/LC_MESSAGES/bison-runtime.mo
35share/locale/es/LC_MESSAGES/bison-runtime.mo 36share/locale/es/LC_MESSAGES/bison-runtime.mo
36share/locale/es/LC_MESSAGES/bison.mo 37share/locale/es/LC_MESSAGES/bison.mo
37share/locale/et/LC_MESSAGES/bison-runtime.mo 38share/locale/et/LC_MESSAGES/bison-runtime.mo
38share/locale/et/LC_MESSAGES/bison.mo 39share/locale/et/LC_MESSAGES/bison.mo
39share/locale/fi/LC_MESSAGES/bison-runtime.mo 40share/locale/fi/LC_MESSAGES/bison-runtime.mo
40share/locale/fi/LC_MESSAGES/bison.mo 41share/locale/fi/LC_MESSAGES/bison.mo
41share/locale/fr/LC_MESSAGES/bison-runtime.mo 42share/locale/fr/LC_MESSAGES/bison-runtime.mo
42share/locale/fr/LC_MESSAGES/bison.mo 43share/locale/fr/LC_MESSAGES/bison.mo
43share/locale/ga/LC_MESSAGES/bison-runtime.mo 44share/locale/ga/LC_MESSAGES/bison-runtime.mo
44share/locale/ga/LC_MESSAGES/bison.mo 45share/locale/ga/LC_MESSAGES/bison.mo
 46share/locale/gl/LC_MESSAGES/bison-runtime.mo
45share/locale/hr/LC_MESSAGES/bison-runtime.mo 47share/locale/hr/LC_MESSAGES/bison-runtime.mo
46share/locale/hr/LC_MESSAGES/bison.mo 48share/locale/hr/LC_MESSAGES/bison.mo
 49share/locale/hu/LC_MESSAGES/bison-runtime.mo
47share/locale/id/LC_MESSAGES/bison-runtime.mo 50share/locale/id/LC_MESSAGES/bison-runtime.mo
48share/locale/id/LC_MESSAGES/bison.mo 51share/locale/id/LC_MESSAGES/bison.mo
49share/locale/it/LC_MESSAGES/bison-runtime.mo 52share/locale/it/LC_MESSAGES/bison-runtime.mo
50share/locale/it/LC_MESSAGES/bison.mo 53share/locale/it/LC_MESSAGES/bison.mo
51share/locale/ja/LC_MESSAGES/bison-runtime.mo 54share/locale/ja/LC_MESSAGES/bison-runtime.mo
52share/locale/ja/LC_MESSAGES/bison.mo 55share/locale/ja/LC_MESSAGES/bison.mo
53share/locale/ky/LC_MESSAGES/bison-runtime.mo 56share/locale/ky/LC_MESSAGES/bison-runtime.mo
54share/locale/lt/LC_MESSAGES/bison-runtime.mo 57share/locale/lt/LC_MESSAGES/bison-runtime.mo
55share/locale/lv/LC_MESSAGES/bison-runtime.mo 58share/locale/lv/LC_MESSAGES/bison-runtime.mo
56share/locale/ms/LC_MESSAGES/bison-runtime.mo 59share/locale/ms/LC_MESSAGES/bison-runtime.mo
57share/locale/ms/LC_MESSAGES/bison.mo 60share/locale/ms/LC_MESSAGES/bison.mo
58share/locale/nb/LC_MESSAGES/bison-runtime.mo 61share/locale/nb/LC_MESSAGES/bison-runtime.mo
59share/locale/nb/LC_MESSAGES/bison.mo 62share/locale/nb/LC_MESSAGES/bison.mo

cvs diff -r1.25 -r1.26 pkgsrc/devel/bison/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/bison/distinfo 2010/08/15 15:16:58 1.25
+++ pkgsrc/devel/bison/distinfo 2011/07/12 14:12:13 1.26
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.25 2010/08/15 15:16:58 wiz Exp $ 1$NetBSD: distinfo,v 1.26 2011/07/12 14:12:13 wiz Exp $
2 2
3SHA1 (bison-2.4.3.tar.bz2) = 2345d568c1ab7fdfbf4e3ae9e08fc8a82790ba3a 3SHA1 (bison-2.5.tar.bz2) = 907319624fe4f4c5f9e2c3e23601041ac636ae31
4RMD160 (bison-2.4.3.tar.bz2) = 7ff76f7c75a9989ab9227cd291c6f75af8a6558d 4RMD160 (bison-2.5.tar.bz2) = 9f90e477c9c397a8b136aa7bcee887767d94eea7
5Size (bison-2.4.3.tar.bz2) = 1652612 bytes 5Size (bison-2.5.tar.bz2) = 2030863 bytes
6SHA1 (patch-aa) = dbc64816b60aebba81125aea0cdc8bb648aa114f 6SHA1 (patch-aa) = dbc64816b60aebba81125aea0cdc8bb648aa114f