pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/bison



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Jul 29 19:25:53 UTC 2012

Modified Files:
        pkgsrc/devel/bison: Makefile distinfo

Log Message:
Update to 2.6:

* Noteworthy changes in release 2.6 (2012-07-19) [stable]

** Future Changes

  The next major release of Bison will drop support for the following
  deprecated features.  Please report disagreements to 
bug-bison%gnu.org@localhost.

*** K&C parsers

  Support for generating parsers in K&R C will be removed.  Parsers
  generated for C support ISO C90, and are tested with ISO C99 and ISO C11
  compilers.

*** Features deprecated since Bison 1.875

  The definitions of yystype and yyltype will be removed; use YYSTYPE and
  YYLTYPE.

  YYPARSE_PARAM and YYLEX_PARAM, deprecated in favor of %parse-param and
  %lex-param, will no longer be supported.

  Support for the preprocessor symbol YYERROR_VERBOSE will be removed, use
  %error-verbose.

*** The generated header will be included (yacc.c)

  Instead of duplicating the content of the generated header (definition of
  YYSTYPE, yyparse declaration etc.), the generated parser will include it,
  as is already the case for GLR or C++ parsers.  This change is deferred
  because existing versions of ylwrap (e.g., Automake 1.12.1) do not support
  it.

** Generated Parser Headers

*** Guards (yacc.c, glr.c, glr.cc)

  The generated headers are now guarded, as is already the case for C++
  parsers (lalr1.cc).  For instance, with --defines=foo.h:

    #ifndef YY_FOO_H
    # define YY_FOO_H
    ...
    #endif /* !YY_FOO_H  */

*** New declarations (yacc.c, glr.c)

  The generated header now declares yydebug and yyparse.  Both honor
  --name-prefix=bar_, and yield

    int bar_parse (void);

  rather than

    #define yyparse bar_parse
    int yyparse (void);

  in order to facilitate the inclusion of several parser headers inside a
  single compilation unit.

*** Exported symbols in C++

  The symbols YYTOKEN_TABLE and YYERROR_VERBOSE, which were defined in the
  header, are removed, as they prevent the possibility of including several
  generated headers from a single compilation unit.

*** YYLSP_NEEDED

  For the same reasons, the undocumented and unused macro YYLSP_NEEDED is no
  longer defined.

** New %define variable: api.prefix

  Now that the generated headers are more complete and properly protected
  against multiple inclusions, constant names, such as YYSTYPE are a
  problem.  While yyparse and others are properly renamed by %name-prefix,
  YYSTYPE, YYDEBUG and others have never been affected by it.  Because it
  would introduce backward compatibility issues in projects not expecting
  YYSTYPE to be renamed, instead of changing the behavior of %name-prefix,
  it is deprecated in favor of a new %define variable: api.prefix.

  The following examples compares both:

    %name-prefix "bar_"               | %define api.prefix "bar_"
    %token <ival> FOO                   %token <ival> FOO
    %union { int ival; }                %union { int ival; }
    %%                                  %%
    exp: 'a';                           exp: 'a';

  bison generates:

    #ifndef BAR_FOO_H                   #ifndef BAR_FOO_H
    # define BAR_FOO_H                  # define BAR_FOO_H

    /* Enabling traces.  */             /* Enabling traces.  */
    # ifndef YYDEBUG                  | # ifndef BAR_DEBUG
                                      > #  if defined YYDEBUG
                                      > #   if YYDEBUG
                                      > #    define BAR_DEBUG 1
                                      > #   else
                                      > #    define BAR_DEBUG 0
                                      > #   endif
                                      > #  else
    #  define YYDEBUG 0               | #   define BAR_DEBUG 0
                                      > #  endif
    # endif                           | # endif

    # if YYDEBUG                      | # if BAR_DEBUG
    extern int bar_debug;               extern int bar_debug;
    # endif                             # endif

    /* Tokens.  */                      /* Tokens.  */
    # ifndef YYTOKENTYPE              | # ifndef BAR_TOKENTYPE
    #  define YYTOKENTYPE             | #  define BAR_TOKENTYPE
       enum yytokentype {             |    enum bar_tokentype {
         FOO = 258                           FOO = 258
       };                                  };
    # endif                             # endif

    #if ! defined YYSTYPE \           | #if ! defined BAR_STYPE \
     && ! defined YYSTYPE_IS_DECLARED |  && ! defined BAR_STYPE_IS_DECLARED
    typedef union YYSTYPE             | typedef union BAR_STYPE
    {                                   {
     int ival;                           int ival;
    } YYSTYPE;                        | } BAR_STYPE;
    # define YYSTYPE_IS_DECLARED 1    | # define BAR_STYPE_IS_DECLARED 1
    #endif                              #endif

    extern YYSTYPE bar_lval;          | extern BAR_STYPE bar_lval;

    int bar_parse (void);               int bar_parse (void);

    #endif /* !BAR_FOO_H  */            #endif /* !BAR_FOO_H  */


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 pkgsrc/devel/bison/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/devel/bison/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index