From patchwork Wed Oct 20 20:27:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4803 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4HZMd435qDz3wcx for ; Wed, 20 Oct 2021 20:28:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4HZMd242nKzmR; Wed, 20 Oct 2021 20:28:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4HZMd16MsQz2yWh; Wed, 20 Oct 2021 20:28:21 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4HZMd0586zz2xMk for ; Wed, 20 Oct 2021 20:28:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4HZMcj2s4yz9l; Wed, 20 Oct 2021 20:28:05 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1634761685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aN++7hLJ98AzZl0xWtMODjwcpd+siy8bkCHJPigB7OU=; b=lW4nV8QiGWOOWCwYM1mlV/g9BHy+znnn7R3s6Tfs7hA0+hI5YtUwcd5ldH7eJs0BE9WKEo QCPHbg+PbpvcdjCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1634761685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aN++7hLJ98AzZl0xWtMODjwcpd+siy8bkCHJPigB7OU=; b=khJXfPK5gU6FdH7MJvhnZ5wSPcByjdW/NaOSUHBoo5jkMXZjKRgZFo9EscxZkUm0cATjvQ GOC5R2gbrI9cVP8379DGECKapMgZsnx0etDfbSSql73mzks1wgET0jRhX17xy1mKgLWaPc /z6p9/hk2jZ6LnIYXXfFato0vW31u6UtkAqcR1AdkiZ+tIdf+tDzGF9cbMpkm6FIxvytLD V7w0tqIohMaJ9e17gWbPiUpwmq4M1nkMixFvZinu/AaAOcnNqTMByOYVYrBM7HIm7vmElr Tg2cehzHPg7RgtQicWpY94AziBDwEuN1HMCHblDgzLPB8WQJzsUgeZJ3wLlf0g== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] bison: Update to version 3.8.2 Date: Wed, 20 Oct 2021 22:27:58 +0200 Message-Id: <20211020202758.3061772-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Update from 3.7.6 to 3.8.2 - Update rootfile - Changelog Noteworthy changes in release 3.8.2 (2021-09-25) [stable] Fixed portability issues of bison on Cygwin. Improvements in glr2.cc: add support for custom error messages (`%define parse.error custom`), allow linking several parsers together. Noteworthy changes in release 3.8.1 (2021-09-11) [stable] The generation of prototypes for yylex and yyerror in Yacc mode is breaking existing grammar files. To avoid breaking too many grammars, the prototypes are now generated when `-y/--yacc` is used *and* the `POSIXLY_CORRECT` environment variable is defined. Avoid using `-y`/`--yacc` simply to comply with Yacc's file name conventions, rather, use `-o y.tab.c`. Autoconf's AC_PROG_YACC macro uses `-y`. Avoid it if possible, for instance by using gnulib's gl_PROG_BISON. Noteworthy changes in release 3.8 (2021-09-07) [stable] ** Backward incompatible changes In conformance with the recommendations of the Graphviz team (https://marc.info/?l=graphviz-devel&m=129418103126092), `-g`/`--graph` now generates a *.gv file by default, instead of *.dot. A transition started in Bison 3.4. To comply with the latest POSIX standard, in Yacc compatibility mode (options `-y`/`--yacc`) Bison now generates prototypes for yyerror and yylex. In some situations, this is breaking compatibility: if the user has already declared these functions but with some differences (e.g., to declare them as static, or to use specific attributes), the generated parser will fail to compile. To disable these prototypes, #define yyerror (to `yyerror`), and likewise for yylex. ** Deprecated features Support for the YYPRINT macro is removed. It worked only with yacc.c and only for tokens. It was obsoleted by %printer, introduced in Bison 1.50 (November 2002). It has always been recommended to prefer `%define api.value.type foo` to `#define YYSTYPE foo`. The latter is supported in C for compatibility with Yacc, but not in C++. Warnings are now issued if `#define YYSTYPE` is used in C++, and eventually support will be removed. In C++ code, prefer value_type to semantic_type to denote the semantic value type, which is specified by the `api.value.type` %define variable. ** New features *** A skeleton for the D programming language The "lalr1.d" skeleton is now officially part of Bison. It was originally contributed by Oliver Mangold, based on Paolo Bonzini's lalr1.java, and was improved by H. S. Teoh. Adela Vais then took over maintenance and invested a lot of efforts to complete, test and document it. It now supports all the bells and whistles of the other deterministic parsers, which include: pull/push interfaces, verbose and custom error messages, lookahead correction, token constructors, internationalization, locations, printers, token and symbol prefixes, etc. Two examples demonstrate the D parsers: a basic one (examples/d/simple), and an advanced one (examples/d/calc). *** Option -H, --header and directive %header The option `-H`/`--header` supersedes the option `--defines`, and the directive %header supersedes %defines. Both `--defines` and `%defines` are, of course, maintained for backward compatibility. *** Option --html Since version 2.4 Bison can be used to generate HTML reports. However it was a two-step process: first bison must be invoked with option `--xml`, and then xsltproc must be run to the convert the XML reports into HTML. The new option `--html` combines these steps. The xsltproc program must be available. *** A C++ native GLR parser A new version of the C++ GLR parser was added: "glr2.cc". It generates "true C++11", instead of a C++ wrapper around a C parser as does the existing "glr.cc" parser. As a first significant consequence, it supports `%define api.value.type variant`, contrary to glr.cc. It should be upward compatible in terms of interface, feature and performance to "glr.cc". To try it out, simply use %skeleton "glr2.cc" It will eventually replace "glr.cc". However we need user feedback on this skeleton. _Please_ report your results and comments about it. *** Counterexamples Counterexamples now show the rule numbers, and always show ε for rules with an empty right-hand side. For instance exp ↳ 1: e1 e2 "a" ↳ 3: ε • ↳ 1: ε instead of exp ↳ e1 e2 "a" ↳ • ↳ ε *** Lookahead correction in Java The Java skeleton (lalr1.java) now supports LAC, via the `parse.lac` %define variable. *** Abort parsing for memory exhaustion (C) User actions may now use `YYNOMEM` (similar to `YYACCEPT` and `YYABORT`) to abort the current parse with memory exhaustion. *** Printing locations in debug traces (C) The `YYLOCATION_PRINT(File, Loc)` macro prints a location. It is defined when (i) locations are enabled, (ii) the default type for locations is used, (iii) debug traces are enabled, and (iv) `YYLOCATION_PRINT` is not already defined. Users may define `YYLOCATION_PRINT` to cover other cases. *** GLR traces There were no debug traces for deferred calls to user actions. They are logged now. Noteworthy changes in release 3.7.6 (2021-03-08) [stable] ** Bug fixes *** Reused Push Parsers When a push-parser state structure is used for multiple parses, it was possible for some state to leak from one run into the following one. *** Fix Table Generation In some very rare conditions, when there are many useless tokens, it was possible to generate incorrect parsers. Signed-off-by: Adolf Belka Reviewed-by: Michael Tremer --- config/rootfiles/common/bison | 14 +++++++++++--- lfs/bison | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/config/rootfiles/common/bison b/config/rootfiles/common/bison index 2fc2e6d1d..5cbbc1f8d 100644 --- a/config/rootfiles/common/bison +++ b/config/rootfiles/common/bison @@ -9,7 +9,6 @@ #usr/share/bison/m4sugar/foreach.m4 #usr/share/bison/m4sugar/m4sugar.m4 #usr/share/bison/skeletons -#usr/share/bison/skeletons/README-D.txt #usr/share/bison/skeletons/bison.m4 #usr/share/bison/skeletons/c++-skel.m4 #usr/share/bison/skeletons/c++.m4 @@ -20,6 +19,7 @@ #usr/share/bison/skeletons/d.m4 #usr/share/bison/skeletons/glr.c #usr/share/bison/skeletons/glr.cc +#usr/share/bison/skeletons/glr2.cc #usr/share/bison/skeletons/java-skel.m4 #usr/share/bison/skeletons/java.m4 #usr/share/bison/skeletons/lalr1.cc @@ -68,6 +68,10 @@ #usr/share/doc/bison/examples/c/calc/Makefile #usr/share/doc/bison/examples/c/calc/README.md #usr/share/doc/bison/examples/c/calc/calc.y +#usr/share/doc/bison/examples/c/glr +#usr/share/doc/bison/examples/c/glr/Makefile +#usr/share/doc/bison/examples/c/glr/README.md +#usr/share/doc/bison/examples/c/glr/c++-types.y #usr/share/doc/bison/examples/c/lexcalc #usr/share/doc/bison/examples/c/lexcalc/Makefile #usr/share/doc/bison/examples/c/lexcalc/README.md @@ -90,9 +94,13 @@ #usr/share/doc/bison/examples/c/rpcalc/Makefile #usr/share/doc/bison/examples/c/rpcalc/rpcalc.y #usr/share/doc/bison/examples/d -#usr/share/doc/bison/examples/d/Makefile #usr/share/doc/bison/examples/d/README.md -#usr/share/doc/bison/examples/d/calc.y +#usr/share/doc/bison/examples/d/calc +#usr/share/doc/bison/examples/d/calc/Makefile +#usr/share/doc/bison/examples/d/calc/calc.y +#usr/share/doc/bison/examples/d/simple +#usr/share/doc/bison/examples/d/simple/Makefile +#usr/share/doc/bison/examples/d/simple/calc.y #usr/share/doc/bison/examples/java #usr/share/doc/bison/examples/java/README.md #usr/share/doc/bison/examples/java/calc diff --git a/lfs/bison b/lfs/bison index 3a2681406..26df21aa8 100644 --- a/lfs/bison +++ b/lfs/bison @@ -24,7 +24,7 @@ include Config -VER = 3.7.6 +VER = 3.8.2 THISAPP = bison-$(VER) DL_FILE = $(THISAPP).tar.xz @@ -45,7 +45,7 @@ objects =$(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = d61aa92e3562cb7292b004ce96173cf7 +$(DL_FILE)_MD5 = c28f119f405a2304ff0a7ccdcc629713 install : $(TARGET)