Commit graph

15 commits

Author SHA1 Message Date
wiz
3c99032bea Update to 2.2:
* 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.
2006-05-30 19:25:23 +00:00
minskim
c7be41f87c Enable NLS on every platform. Previously it was enabled on Linux but not
on NetBSD.  Bump PKGREVISION.
2006-05-03 15:41:05 +00:00
jlam
792529759b * Honor PKGINFODIR.
* List the info files directly in the PLIST.
2006-03-30 03:44:41 +00:00
wiz
a56deee5f1 Update to 2.1:
Changes in version 2.1, 2005-09-16:

* Bison-generated parsers now support the translation of diagnostics like
  "syntax error" into languages other than English.  The default
  language is still English.  For details, please see the new
  Internationalization section of the Bison manual.  Software
  distributors should also see the new PACKAGING file.  Thanks to
  Bruno Haible for this new feature.

* Wording in the Bison-generated parsers has been changed slightly to
  simplify translation.  In particular, the message "memory exhausted"
  has replaced "parser stack overflow", as the old message was not
  always accurate for modern Bison-generated parsers.

* Destructors are now called when the parser aborts, for all symbols left
  behind on the stack.  Also, the start symbol is now destroyed after a
  successful parse.  In both cases, the behavior was formerly inconsistent.

* When generating verbose diagnostics, Bison-generated parsers no longer
  quote the literal strings associated with tokens.  For example, for
  a syntax error associated with '%token NUM "number"' they might
  print 'syntax error, unexpected number' instead of 'syntax error,
  unexpected "number"'.
2005-09-30 13:51:25 +00:00
seb
689189ef2d Remove info files entries from PLIST file. 2004-02-13 08:26:03 +00:00
seb
2cc5045c97 Convert to USE_NEW_TEXINFO. 2003-06-19 21:48:04 +00:00
cjep
bbabdca4c2 Update of devel/bison to version 1.875.
Differences to the plain GNU version in the packages collection:
* We do not install the shell wrapper "yacc" (it is supplied because
POSIX requires it and we already have a yacc command).

Changes since 1.75:
* Numerous bug fixes and improvements including:
   + Compatibility (with 1.35 and Solaris yacc) changes;
   + Fixes for GCC 3.2.1;
   + Use Yacc style of conflict reports;
   + Fix bug where error locations were not being recorded correctly;
   + Fix bad interaction with flex 2.5.23.

Please see the ChangeLog file supplied with the bison source code
for more details.
2003-01-01 13:15:47 +00:00
cjep
66f0c03b35 Upgrade of devel/bison to 1.75.
Changes since 1.35 (too many to mention here, please see the
ChangeLog in the bison source distribution):
* GNU m4 is now required.
* Various bug fixes.
* intl source removed.

NetBSD pkgsrc changes:
* Change of maintainer thorpej->cjep.
2002-12-15 19:41:24 +00:00
grant
bb2abd1ee2 USE_PKGLOCALEDIR. 2002-11-30 14:04:01 +00:00
wiz
ea0732de3a Fix comment. 2002-05-10 00:15:59 +00:00
wiz
b3a73be2d3 Update to 1.35:
* C Skeleton
  Some projects use Bison's C parser with C++ compilers, and define
  YYSTYPE as a class.  The recent adjustment of C parsers for data
  alignment and 64 bit architectures made this impossible.

  Because for the time being no real solution for C++ parser
  generation exists, kludges were implemented in the parser to
  maintain this use.  In the future, when Bison has C++ parsers, this
  kludge will be disabled.

  This kludge also addresses some C++ problems when the stack was
  extended.
2002-03-29 09:42:51 +00:00
wiz
8686edaecd Update to 1.34. Changes since 1.32:
* File name clashes are detected
  $ bison foo.y -d -o foo.x
  fatal error: header and parser would be both named `foo.x'

* A missing `;' ending a rule triggers a warning
  In accordance with POSIX, and in agreement with other
  Yacc implementations, Bison will mandate this semicolon in a near
  future.  This eases the implementation of a Bison parser of Bison
  grammars by making this grammar LALR(1) instead of LR(2).  To
  facilitate the transition, this release introduces a warning.

* Revert the C++ namespace changes introduced in 1.31, as they caused too
  many portability hassles.

* Fix test suite portability problems.

* Fix C++ issues
  Groff could not be compiled for the definition of size_t was lacking
  under some conditions.

* Catch invalid @n
  As is done with $n.
2002-03-19 11:01:59 +00:00
seb
66111c6d15 Introduce new framework for handling info files generation and installation.
Summary of changes:
- removal of USE_GTEXINFO
- addition of mk/texinfo.mk
- inclusion of this file in package Makefiles requiring it
- `install-info' substituted by `${INSTALL_INFO}' in PLISTs
- tuning of mk/bsd.pkg.mk:
    removal of USE_GTEXINFO
    INSTALL_INFO added to PLIST_SUBST
    `${INSTALL_INFO}' replace `install-info' in target rules
    print-PLIST target now generate `${INSTALL_INFO}' instead of `install-info'
- a couple of new patch files added for a handful of packages
- setting of the TEXINFO_OVERRIDE "switch" in packages Makefiles requiring it
- devel/cssc marked requiring texinfo 4.0
- a couple of packages Makefiles were tuned with respect of INFO_FILES and
  makeinfo command usage

See -newly added by this commit- section 10.24 of Packages.txt for
further information.
2002-02-18 15:14:00 +00:00
mjl
04c1aeaf83 Update to bison 1.32
* Fix Yacc output file names
* Portability fixes
* Italian, Dutch, Swedish, Russian translation
* Many Bug Fixes
* Use of alloca in parsers
* When the generated parser lacks debugging code, YYDEBUG is now 0
  (as POSIX requires) instead of being undefined.
* User Actions
  Bison has always permitted actions such as { $$ = $1 }: it adds the
  ending semicolon.  Now if in Yacc compatibility mode, the semicolon
  is no longer output: one has to write { $$ = $1; }.
* Better C++ compliance
  The output parsers try to respect C++ namespaces.
* Reduced Grammars
  Fixed bugs when reporting useless nonterminals.
* 64 bit hosts
  The parsers work properly on 64 bit hosts.
* Error messages
  Some calls to strerror resulted in scrambled or missing error messages.
* The verbose report includes the rule line numbers.
* Rule line numbers are fixed in traces.
* Parse errors
  Verbose parse error messages from the parsers are better looking.
* Fixed parser memory leaks.
  When the generated parser was using malloc to extend its stacks, the
  previous allocations were not freed.
* Fixed verbose output file.
  Some newlines were missing.
  Some conflicts in state descriptions were missing.
* Fixed conflict report.
  Option -v was needed to get the result.
* Fixed incorrect processing of some invalid input.
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
* %token MY_EOF 0 is supported.
  Before, MY_EOF was silently renumbered as 257.
* doc/refcard.tex is updated.
* %output, %file-prefix, %name-prefix.
* --output
* `--defines' and `--graph' have now an optionnal argument which is the
  output file name. `-d' and `-g' do not change, they do not take any
  argument.
* Portability fixes.
* The output file does not define const, as this caused problems when used
  with common autoconfiguration schemes.  If you still use ancient compilers
  that lack const, compile with the equivalent of the C compiler option
  `-Dconst='.  autoconf's AC_C_CONST macro provides one way to do this.
* Added `-g' and `--graph'.
* The input and the output files has automatically a similar extension.
* NLS support updated; should hopefully be less troublesome.
* Added the old Bison reference card.
* Added `--locations' and `%locations'.
* Added `-S' and `--skeleton'.
* `%raw', `-r', `--raw' is disabled.
* Special characters are escaped when output.  This solves the problems
  of the #line lines with path names including backslashes.
* New directives.
* @$ Automatic location tracking.
2002-01-31 13:43:57 +00:00
zuntum
c72c1cf5f9 Move pkg/ files into package's toplevel directory 2001-11-01 00:57:41 +00:00