delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/05/22/13:36:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-Id: <200605221729.k4MHTXuo023031@delorie.com>
X-Authenticated: #27081556
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: djgpp-announce AT delorie DOT com
Subject: ANNOUNCE: DJGPP port of GNU bison 2.2 uploaded.
Date: Mon, 22 May 2006 19:23:34 +0200
X-Y-GMX-Trusted: 0

This is a port of GNU Bison 2.2 to MSDOS/DJGPP.

  Bison is a Yacc compatible parser generator.


  DJGPP specific changes.
  =======================

  - The DJGPP port of Bison offers LFN and SFN support depending on which OS it
    is running.  If LFN support is available or not is determinated at run time.
    If LFN support is available (DOS session under Win9X), the standard posix
    file name extensions will be used. These are: y.tab.c, y.tab.c++, y.tab.h,
    y.output, etc. If only SFN support is available (plain DOS), then the
    standard MSDOS short file names will be used. These are: y_tab.c, y_tab.h,
    y.out, etc.
  - It should be noticed that this version of Bison uses the m4 program as a
    backend to generate the parser file (e.g. y_tab.c, etc.) from the skeleton
    files. This means that m4 *must* be installed and available when bison's is
    invoked or bison will not be able to generate the parser file. m4 will use
    a couple m4 scripts that will be installed in /dev/env/DJDIR/share/bison.
    This version of bison requires at least m4 1.4.3 available as m4-143b.zip
    at ftp://ftp.delorie.com and mirrors.
  - It should also be noticed that the two skeleton files bison.simple and
    bison.hairy are no longer used nor supported anymore. This applies also to
    the two environment variables BISON_HAIRY and BISON_SIMPLE.
    Those variables are *no* longer honored at all. This implies that you can
    no longer use these variables to point bison to an alternative skeleton file.
    Use the command line option `-S' instead.
  - The skeleton file bison.simple is now called yacc.c and is an m4 script.
    Please notice that the grammar type coded in the skeleton file bison.hairy
    is no longer supported by the bison maintainer. The other two skeleton
    files supported by this bison version are glr.c and lalr1.cc. The first one
    is a generalized LR C parser based on Bison's LALR(1) tables and the
    second one is a experimental C++ parser class.



  Here is a list of user-visible changes in version 2.2. taken from the NEWS file:

* The distribution terms for all Bison-generated parsers now permit
  using the parsers in nonfree programs.  Previously, this permission
  was granted only for Bison-generated LALR(1) parsers in C.

* %name-prefix changes the namespace name in C++ outputs.

* The C++ parsers export their token_type.

* Bison now allows multiple %union declarations, and concatenates
  their contents together.

* New warning: unused values
  Right-hand side symbols whose values are not used are reported,
  if the symbols have destructors.  For instance:

     exp: exp "?" exp ":" exp { $1 ? $1 : $3; }
	| exp "+" exp
	;

  will trigger a warning about $$ and $5 in the first rule, and $3 in
  the second ($1 is copied to $$ by the default rule).  This example
  most likely contains three errors, and could be rewritten as:

     exp: exp "?" exp ":" exp
	    { $$ = $1 ? $3 : $5; free ($1 ? $5 : $3); free ($1); }
	| exp "+" exp
	    { $$ = $1 ? $1 : $3; if ($1) free ($3); }
	;

  However, if the original actions were really intended, memory leaks
  and all, the warnings can be suppressed by letting Bison believe the
  values are used, e.g.:

     exp: exp "?" exp ":" exp { $1 ? $1 : $3; (void) ($$, $5); }
	| exp "+" exp         { $$ = $1; (void) $3; }
	;

  If there are mid-rule actions, the warning is issued if no action
  uses it.  The following triggers no warning: $1 and $3 are used.

     exp: exp { push ($1); } '+' exp { push ($3); sum (); };

  The warning is intended to help catching lost values and memory leaks.
  If a value is ignored, its associated memory typically is not reclaimed.

* %destructor vs. YYABORT, YYACCEPT, and YYERROR.
  Destructors are now called when user code invokes YYABORT, YYACCEPT,
  and YYERROR, for all objects on the stack, other than objects
  corresponding to the right-hand side of the current rule.

* %expect, %expect-rr
  Incorrect numbers of expected conflicts are now actual errors,
  instead of warnings.

* GLR, YACC parsers.
  The %parse-params are available in the destructors (and the
  experimental printers) as per the documentation.

* Bison now warns if it finds a stray `$' or `@' in an action.

* %require "VERSION"
  This specifies that the grammar file depends on features implemented
  in Bison version VERSION or higher.

* lalr1.cc: The token and value types are now class members.
  The tokens were defined as free form enums and cpp macros.  YYSTYPE
  was defined as a free form union.  They are now class members:
  tokens are enumerations of the `yy::parser::token' struct, and the
  semantic values have the `yy::parser::semantic_type' type.

  If you do not want or can update to this scheme, the directive
  `%define "global_tokens_and_yystype" "1"' triggers the global
  definition of tokens and YYSTYPE.  This change is suitable both
  for previous releases of Bison, and this one.

  If you wish to update, then make sure older version of Bison will
  fail using `%require "2.2"'.

* DJGPP support added.

  For futher information about GNU bison please read the info docs and NEWS file.



  Please also note that the testsuite will only work if LFN are available.
  Two tests will be skipped (131 and 132). No other tests should fail.


  The port consists of the usual three packages that have been compiled
  using stock djdev203 and that can be downloaded from ftp.delorie.com
  and mirrors as (timestamp 2006-05-22):

    Bison 2.2 binary, info and man format documentation:
    ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/bsn22b.zip

    Bison 2.2 dvi, html, ps and pdf format documentation:
    ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/bsn22d.zip

    Bison 2.2 source:
    ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/bsn22s.zip


  For the convenience of the WinXP users the binaries has been produced
  a second time using the djdev204 beta library. This package is available
  at ftp.delorie.com and mirrors as (timestamp 2006-05-22):

   Bison 2.2 binary, info and man format documentation:
   ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/bsn22b.zip


  Send GNU bison specific bug reports to <bug-bison AT gnu DOT org>.
  Send suggestions and bug reports concerning the DJGPP port to
  comp.os.msdos.djgpp or <djgpp AT delorie DOT com>.


Enjoy.

        Guerrero, Juan Manuel <juan DOT guerrero AT gmx DOT de>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019