From MAILER-DAEMON Sun Jun 03 15:58:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbGwE-0006wG-Qe
	for mharc-bug-bison@gnu.org; Sun, 03 Jun 2012 15:58:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41283)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SbGwB-0006w9-J2
	for bug-bison@gnu.org; Sun, 03 Jun 2012 15:58:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SbGw8-0006Nt-Vu
	for bug-bison@gnu.org; Sun, 03 Jun 2012 15:58:07 -0400
Received: from mx.meyering.net ([88.168.87.75]:52392)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SbGw8-0006Nf-Jl
	for bug-bison@gnu.org; Sun, 03 Jun 2012 15:58:04 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id CE1F960173
	for <bug-bison@gnu.org>; Sun,  3 Jun 2012 21:58:01 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bison Bugs <bug-bison@gnu.org>
Subject: [PATCH] fix comment typos
Date: Sun, 03 Jun 2012 21:58:01 +0200
Message-ID: <87y5o4b22e.fsf@rho.meyering.net>
Lines: 186
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 03 Jun 2012 19:58:09 -0000

Here are a few automatically-performed typo fixes:
(possibly mangled due to ^M's in config.bat)

>From 20ad79a6084472a518ccf9d8fa7f330d864de987 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sun, 3 Jun 2012 21:54:52 +0200
Subject: [PATCH] fix comment typos

Using http://github.com/lyda/misspell-check, massage its
output into sed commands to perform the suggested changes:
(the sole filter is to avoid changing the THRU tokens in a grammar)

git ls-files|misspellings -f -|perl -nl \
  -e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \
  -e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\
  -e 'print "sed -i $q${n}s!$l!$r!$q $file"'|grep -vw THRU|bash
---
 ChangeLog-2012   | 18 +++++++++---------
 data/lalr1.cc    |  2 +-
 data/yacc.c      |  2 +-
 djgpp/README.in  |  2 +-
 djgpp/config.bat |  2 +-
 src/parse-gram.c |  2 +-
 tests/local.at   |  2 +-
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/ChangeLog-2012 b/ChangeLog-2012
index faa7e18..35e6948 100644
--- a/ChangeLog-2012
+++ b/ChangeLog-2012
@@ -4655,7 +4655,7 @@
 	* src/output.c (symbol_definitions_output): Use it to define "id"
 	and "has_id".
 	Remove the definition of "tag_is_id".
-	* data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
+	* data/lalr1.cc: Use the "id" and "has_id" wherever "tag" and
 	"tag_is_id" were used to produce code.
 	We still use "tag" for documentation.

@@ -5200,7 +5200,7 @@

 2008-11-09  Akim Demaille  <demaille@gostai.com>

-	Agregate yylval and yylloc.
+	Aggregate yylval and yylloc.
 	* data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
 	(parser::yyla): this.

@@ -5358,7 +5358,7 @@
 	* data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
 	(b4_variant_if): New.
 	(variant::built): New.
-	Use it whereever the status of the variant changes.
+	Use it wherever the status of the variant changes.
 	* etc/bench.pl.in: Check the penalty of %define assert.

 2008-11-07  Akim Demaille  <demaille@gostai.com>
@@ -10643,7 +10643,7 @@
 	(PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
 	which is now, again, a separate token.
 	Adjust all dependencies.
-	Whereever actions with $ and @ are used, use translate_code.
+	Wherever actions with $ and @ are used, use translate_code.
 	(action): Remove this nonterminal which is now useless.
 	* src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
 	(grammar_current_rule_action_append): Use translate_code.
@@ -11829,10 +11829,10 @@

 	* Makefile.am: DJGPP specific files added to EXTRA_DIST.
 	* djgpp/Makefile.maint: Fix PACKAGE variable computation.
-	* djgpp/config.bat: Replace every occurence of the file name
+	* djgpp/config.bat: Replace every occurrence of the file name
 	scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
 	c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
-	* djgpp/config.sed: Replace every occurence of the file name
+	* djgpp/config.sed: Replace every occurrence of the file name
 	scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
 	c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
 	* djgpp/djunpack.bat: DJGPP specific file.
@@ -15105,7 +15105,7 @@
 	(YYERROR): Goto to yyerrorlab, not yyerrlab1.
 	(yyerrlab1): Remove, but where it used to be (now the bottom part of
 	yyerrlab), when hitting EOF, pop the whole stack here instead of
-	merely falling thru the default error handling mechanism.
+	merely falling through the default error handling mechanism.
 	(yyerrorlab): New label, with the old contents of YYERROR,
 	plus the following change: pop the stack of rhs corresponding
 	to the production that invoked YYERROR.  That is how Yacc
@@ -18827,7 +18827,7 @@

 2002-07-30  Akim Demaille  <akim@epita.fr>

-	`stage' was accidently included in a previous patch.
+	`stage' was accidentally included in a previous patch.
 	Initiate its autoconfiscation.

 	* configure.in: Look for malloc.h and sys/times.h.
@@ -21830,7 +21830,7 @@
 	(insert_accepting_state, augment_automaton): Remove, since now
 	these states are automatically computed from the initial state.
 	(generate_states): Adjust.
-	* src/print.c: When reporting a rule number to the user, substract
+	* src/print.c: When reporting a rule number to the user, subtract
 	1, so that the axiom rule is rule 0, and the first user rule is 1.
 	* src/reduce.c: Likewise.
 	* src/print_graph.c (print_core): For the time being, just as for
diff --git a/data/lalr1.cc b/data/lalr1.cc
index 92f93c2..b8334e8 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -850,7 +850,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
       // Destroy a variant which value may have been swapped with
       // yylhs.value (for instance if the action was "std::swap($$,
       // $1)").  The value of yylhs.value (hence possibly one of these
-      // rhs symbols) depends on the default contruction for this
+      // rhs symbols) depends on the default construction for this
       // type.  In the case of pointers for instance, no
       // initialization is done, so the value is junk.  Therefore do
       // not try to report the value of symbols about to be destroyed
diff --git a/data/yacc.c b/data/yacc.c
index cb6d8e5..0cc17f3 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -199,7 +199,7 @@ m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
        `yyvs': related to semantic values.]b4_locations_if([[
        `yyls': related to locations.]])[

-       Refer to the stacks thru separate pointers, to allow yyoverflow
+       Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */

     /* The state stack.  */
diff --git a/djgpp/README.in b/djgpp/README.in
index 154c8a2..60fd952 100644
--- a/djgpp/README.in
+++ b/djgpp/README.in
@@ -179,7 +179,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.

 	This will install the products into your DJGPP installation tree given
 	by the default prefix "/dev/env/DJDIR".  If you prefer to install them
-	into some other directory you will have to set prefix to the appropiate
+	into some other directory you will have to set prefix to the appropriate
 	value:
 	  make install prefix=z:/some/other/place

diff --git a/djgpp/config.bat b/djgpp/config.bat
index e30c939..ab566d7 100644
--- a/djgpp/config.bat
+++ b/djgpp/config.bat
@@ -471,7 +471,7 @@ redir -e /dev/null rm %XSRC%/po/stamp-cat-id
 
 Rem Update the arguments file for the configure script.
 Rem We prefer without-included-gettext because libintl.a from gettext package
-Rem is the only one that is garanteed to have been ported to DJGPP.
+Rem is the only one that is guaranteed to have been ported to DJGPP.
 echo --enable-nls --without-included-gettext >> args
 goto ConfigurePackage
 
diff --git a/src/parse-gram.c b/src/parse-gram.c
index 24ff8f0..2cfebe4 100644
--- a/src/parse-gram.c
+++ b/src/parse-gram.c
@@ -1937,7 +1937,7 @@ YYLTYPE yylloc;
        `yyvs': related to semantic values.
        `yyls': related to locations.

-       Refer to the stacks thru separate pointers, to allow yyoverflow
+       Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */

     /* The state stack.  */
diff --git a/tests/local.at b/tests/local.at
index c71a2a9..a53f1d1 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -624,7 +624,7 @@ main (void)
 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
 # expanding macros, so it corrupts some special characters in the
 # macros.  To avoid this, expand now and pass it the result with proper
-# string quotation.  Assume args 7 thru 12 expand to properly quoted
+# string quotation.  Assume args 7 through 12 expand to properly quoted
 # strings.

 m4_if(m4_index(m4_quote($3), [no-xml]), -1,
-- 
1.7.11.rc0.100.g5498c5f


From MAILER-DAEMON Tue Jun 05 02:41:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbnSW-0006ui-9t
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 02:41:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42418)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SbnSQ-0006tw-KJ
	for bug-bison@gnu.org; Tue, 05 Jun 2012 02:41:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SbnSK-0000zy-K8
	for bug-bison@gnu.org; Tue, 05 Jun 2012 02:41:34 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:55258
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SbnSK-0000bk-DG
	for bug-bison@gnu.org; Tue, 05 Jun 2012 02:41:28 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SbnRo-0001PG-15; Tue, 05 Jun 2012 08:40:56 +0200
Subject: Re: [PATCH] fix comment typos
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <87y5o4b22e.fsf@rho.meyering.net>
Date: Tue, 5 Jun 2012 08:41:09 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <33A9CA76-CA4C-4FD7-A87B-003B2EFC201B@lrde.epita.fr>
References: <87y5o4b22e.fsf@rho.meyering.net>
To: Jim Meyering <jim@meyering.net>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 06:41:39 -0000


Le 3 juin 2012 =E0 21:58, Jim Meyering a =E9crit :

> Here are a few automatically-performed typo fixes:
> (possibly mangled due to ^M's in config.bat)
>=20
>> =46rom 20ad79a6084472a518ccf9d8fa7f330d864de987 Mon Sep 17 00:00:00 =
2001
> From: Jim Meyering <meyering@redhat.com>
> Date: Sun, 3 Jun 2012 21:54:52 +0200
> Subject: [PATCH] fix comment typos
>=20
> Using http://github.com/lyda/misspell-check, massage its
> output into sed commands to perform the suggested changes:
> (the sole filter is to avoid changing the THRU tokens in a grammar)

Hi Jim!

Thanks!  Would you like to install it?  On "maint" please.



From MAILER-DAEMON Tue Jun 05 02:53:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbneI-00084I-Kh
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 02:53:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55714)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SbneD-00083k-5b
	for bug-bison@gnu.org; Tue, 05 Jun 2012 02:53:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sbne6-0003Lg-Sw
	for bug-bison@gnu.org; Tue, 05 Jun 2012 02:53:44 -0400
Received: from mx.meyering.net ([88.168.87.75]:57777)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sbne6-0003LQ-MO
	for bug-bison@gnu.org; Tue, 05 Jun 2012 02:53:38 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 054B5603F4;
	Tue,  5 Jun 2012 08:53:37 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: [PATCH] fix comment typos
In-Reply-To: <33A9CA76-CA4C-4FD7-A87B-003B2EFC201B@lrde.epita.fr> (Akim
	Demaille's message of "Tue, 5 Jun 2012 08:41:09 +0200")
References: <87y5o4b22e.fsf@rho.meyering.net>
	<33A9CA76-CA4C-4FD7-A87B-003B2EFC201B@lrde.epita.fr>
Date: Tue, 05 Jun 2012 08:53:36 +0200
Message-ID: <87oboyckr3.fsf@rho.meyering.net>
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Bison Bugs <bug-bison@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 06:53:49 -0000

Akim Demaille wrote:

> Le 3 juin 2012 =E0 21:58, Jim Meyering a =E9crit :
>
>> Here are a few automatically-performed typo fixes:
>> (possibly mangled due to ^M's in config.bat)
>>
>>> From 20ad79a6084472a518ccf9d8fa7f330d864de987 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering@redhat.com>
>> Date: Sun, 3 Jun 2012 21:54:52 +0200
>> Subject: [PATCH] fix comment typos
>>
>> Using http://github.com/lyda/misspell-check, massage its
>> output into sed commands to perform the suggested changes:
>> (the sole filter is to avoid changing the THRU tokens in a grammar)
>
> Hi Jim!
>
> Thanks!  Would you like to install it?  On "maint" please.

Sure.
What do you think about correcting the spelling of "THRU"?
(THRU was filtered out of the posted patch)?

  $ grep THRU tests/existing.at
  %token THRU
          | COPY TEXT THRU
          | COPY THRU

This is a minor weakness in the misspellings script:
it would map all-caps THRU to leading-cap Through, rather than to THROUGH.

I suggest to do this,

  sed -i 's!THRU!THROUGH!' tests/existing.at

if only to avoid the need for an exclusion when/if this
is automated or repeated.


From MAILER-DAEMON Tue Jun 05 03:01:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbnlm-0000mO-6z
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 03:01:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53260)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbnlk-0000lq-8z
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:01:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbnle-0005HX-4k
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:01:31 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:40069
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbnld-0005Gi-VH
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:01:26 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sbnlc-0003IK-EK; Tue, 05 Jun 2012 09:01:24 +0200
Subject: Re: [PATCH] fix comment typos
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <87oboyckr3.fsf@rho.meyering.net>
Date: Tue, 5 Jun 2012 09:01:37 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <4E8ABA39-4A1C-4F70-A3CF-4297BCE8EA07@lrde.epita.fr>
References: <87y5o4b22e.fsf@rho.meyering.net>
	<33A9CA76-CA4C-4FD7-A87B-003B2EFC201B@lrde.epita.fr>
	<87oboyckr3.fsf@rho.meyering.net>
To: Jim Meyering <jim@meyering.net>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 07:01:33 -0000


Le 5 juin 2012 =E0 08:53, Jim Meyering a =E9crit :

> Sure.
> What do you think about correcting the spelling of "THRU"?
> (THRU was filtered out of the posted patch)?
>=20
>  $ grep THRU tests/existing.at
>  %token THRU
>          | COPY TEXT THRU
>          | COPY THRU
>=20
> This is a minor weakness in the misspellings script:
> it would map all-caps THRU to leading-cap Through, rather than to =
THROUGH.
>=20
> I suggest to do this,
>=20
>  sed -i 's!THRU!THROUGH!' tests/existing.at
>=20
> if only to avoid the need for an exclusion when/if this
> is automated or repeated.

I'm fine with THROUGH!  The fewer exceptions, the better!



From MAILER-DAEMON Tue Jun 05 03:18:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbo2W-00047G-A5
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 03:18:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42486)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sbo2Q-00046Y-KL
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:18:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sbo2M-0000RO-Dr
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:18:46 -0400
Received: from mx.meyering.net ([88.168.87.75]:57884)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sbo2M-0000RB-6f
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:18:42 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id ABBB060073;
	Tue,  5 Jun 2012 09:18:40 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: [PATCH] fix comment typos
In-Reply-To: <4E8ABA39-4A1C-4F70-A3CF-4297BCE8EA07@lrde.epita.fr> (Akim
	Demaille's message of "Tue, 5 Jun 2012 09:01:37 +0200")
References: <87y5o4b22e.fsf@rho.meyering.net>
	<33A9CA76-CA4C-4FD7-A87B-003B2EFC201B@lrde.epita.fr>
	<87oboyckr3.fsf@rho.meyering.net>
	<4E8ABA39-4A1C-4F70-A3CF-4297BCE8EA07@lrde.epita.fr>
Date: Tue, 05 Jun 2012 09:18:40 +0200
Message-ID: <87d35ecjlb.fsf@rho.meyering.net>
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Bison Bugs <bug-bison@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 07:18:51 -0000

Akim Demaille wrote:
> Le 5 juin 2012 =E0 08:53, Jim Meyering a =E9crit :
>
>> Sure.
>> What do you think about correcting the spelling of "THRU"?
>> (THRU was filtered out of the posted patch)?
>>
>>  $ grep THRU tests/existing.at
>>  %token THRU
>>          | COPY TEXT THRU
>>          | COPY THRU
>>
>> This is a minor weakness in the misspellings script:
>> it would map all-caps THRU to leading-cap Through, rather than to THROUG=
H.
>>
>> I suggest to do this,
>>
>>  sed -i 's!THRU!THROUGH!' tests/existing.at
>>
>> if only to avoid the need for an exclusion when/if this
>> is automated or repeated.
>
> I'm fine with THROUGH!  The fewer exceptions, the better!

Adjusted and pushed to maint.


From MAILER-DAEMON Tue Jun 05 03:24:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sbo7x-0005US-MS
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 03:24:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55375)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbo7q-0005TI-NP
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:24:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbo7p-0001er-5j
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:24:22 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:46387
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbo7o-0001eZ-Vo
	for bug-bison@gnu.org; Tue, 05 Jun 2012 03:24:21 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sbo7n-00043m-I7; Tue, 05 Jun 2012 09:24:19 +0200
Subject: Re: [PATCH] fix comment typos
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <87d35ecjlb.fsf@rho.meyering.net>
Date: Tue, 5 Jun 2012 09:24:32 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <A0D0825C-647E-40E9-ACCB-60ED3F31B0F6@lrde.epita.fr>
References: <87y5o4b22e.fsf@rho.meyering.net>
	<33A9CA76-CA4C-4FD7-A87B-003B2EFC201B@lrde.epita.fr>
	<87oboyckr3.fsf@rho.meyering.net>
	<4E8ABA39-4A1C-4F70-A3CF-4297BCE8EA07@lrde.epita.fr>
	<87d35ecjlb.fsf@rho.meyering.net>
To: Jim Meyering <jim@meyering.net>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 07:24:28 -0000


Le 5 juin 2012 =E0 09:18, Jim Meyering a =E9crit :

> Adjusted and pushed to maint.

Thanks!

I'm in the process of trying to make 2.5.1 exist today.



From MAILER-DAEMON Tue Jun 05 05:03:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbpfM-0006Dg-EE
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 05:03:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47479)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SbpfE-0006Cq-CD
	for bug-bison@gnu.org; Tue, 05 Jun 2012 05:03:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sbpf7-0007V7-Vf
	for bug-bison@gnu.org; Tue, 05 Jun 2012 05:02:55 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:56241
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sbpel-0007N3-O9; Tue, 05 Jun 2012 05:02:27 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sbpej-0007tg-0I; Tue, 05 Jun 2012 11:02:25 +0200
Content-Type: text/plain; charset=us-ascii
Subject: bison-2.5.1 released [stable]
Mime-Version: 1.0 (Apple Message framework v1278)
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 5 Jun 2012 11:02:38 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
To: GNU Announcements List <info-gnu@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: coordinator@translationproject.org, Bison Help <help-bison@gnu.org>,
	Bison Bugs <bug-bison@gnu.org>, Bison Patches <bison-patches@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Bison Bugs <bug-bison@gnu.org>
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 09:03:02 -0000

The Bison team is very happy to announce the birth of Bison 2.5.1,
which addresses quite a few issues from Bison 2.5.

Here are the compressed sources:
  ftp://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz   (2.7MB)
  ftp://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.xz   (1.5MB)

Here are the GPG detached signatures[*]:
  ftp://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz.sig
  ftp://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.xz.sig

Use a mirror for higher download bandwidth:
  http://www.gnu.org/order/ftp.html

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify bison-2.5.1.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 0DDCAA3278D5264E

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.12
  Flex 2.5.35
  Gettext 0.18.1
  Gnulib v0.0-7415-g338dd5d

NEWS

* Noteworthy changes in release 2.5.1 (2012-06-05) [stable]

** Future changes:

  The next major release will drop support for generating parsers in K&R C.

** yacc.c: YYBACKUP works as expected.

** glr.c improvements:

*** Location support is eliminated when not requested:

  GLR parsers used to include location-related code even when locations were
  not requested, and therefore not even usable.

*** __attribute__ is preserved:

  __attribute__ is no longer disabled when __STRICT_ANSI__ is defined (i.e.,
  when -std is passed to GCC).

** lalr1.java: several fixes:

  The Java parser no longer throws ArrayIndexOutOfBoundsException if the
  first token leads to a syntax error.  Some minor clean ups.

** Changes for C++:

*** C++11 compatibility:

  C and C++ parsers use "nullptr" instead of "0" when __cplusplus is 201103L
  or higher.

*** Header guards

  The header files such as "parser.hh", "location.hh", etc. used a constant
  name for preprocessor guards, for instance:

  #ifndef BISON_LOCATION_HH
  # define BISON_LOCATION_HH
  ...
  #endif // !BISON_LOCATION_HH

  The inclusion guard is now computed from "PREFIX/FILE-NAME", where lower
  case characters are converted to upper case, and series of
  non-alphanumerical characters are converted to an underscore.

  With "bison -o lang++/parser.cc", "location.hh" would now include:

  #ifndef YY_LANG_LOCATION_HH
  # define YY_LANG_LOCATION_HH
  ...
  #endif // !YY_LANG_LOCATION_HH

*** C++ locations:

  The position and location constructors (and their initialize methods)
  accept new arguments for line and column.  Several issues in the
  documentation were fixed.

** liby is no longer asking for "rpl_fprintf" on some platforms.

** Changes in the manual:

*** %printer is documented

  The "%printer" directive, supported since at least Bison 1.50, is finally
  documented.  The "mfcalc" example is extended to demonstrate it.

  For consistency with the C skeletons, the C++ parsers now also support
  "yyoutput" (as an alias to "debug_stream ()").

*** Several improvements have been made:

  The layout for grammar excerpts was changed to a more compact scheme.
  Named references are motivated.  The description of the automaton
  description file (*.output) is updated to the current format.  Incorrect
  index entries were fixed.  Some other errors were fixed.

** Building bison:

*** Conflicting prototypes with recent/modified Flex.

  Fixed build problems with the current, unreleased, version of Flex, and
  some modified versions of 2.5.35, which have modified function prototypes.

*** Warnings during the build procedure have been eliminated.

*** Several portability problems in the test suite have been fixed:

  This includes warnings with some compilers, unexpected behavior of tools
  such as diff, warning messages from the test suite itself, etc.

*** The install-pdf target works properly:

  Running "make install-pdf" (or -dvi, -html, -info, and -ps) no longer
  halts in the middle of its course.



From MAILER-DAEMON Tue Jun 05 16:33:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sc0RX-000384-Kr
	for mharc-bug-bison@gnu.org; Tue, 05 Jun 2012 16:33:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44234)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rms@gnu.org>)
	id 1Sc08m-0007BS-Rj
	for bug-bison@gnu.org; Tue, 05 Jun 2012 16:14:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rms@gnu.org>) id 1Sc08g-0000k3-FE
	for bug-bison@gnu.org; Tue, 05 Jun 2012 16:14:08 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:50967)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rms@gnu.org>)
	id 1Sc08g-0000jy-CM
	for bug-bison@gnu.org; Tue, 05 Jun 2012 16:14:02 -0400
Received: from rms by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rms@gnu.org>)
	id 1Sc08f-00067Y-C2; Tue, 05 Jun 2012 16:14:01 -0400
Date: Tue, 05 Jun 2012 16:14:01 -0400
Message-Id: <E1Sc08f-00067Y-C2@fencepost.gnu.org>
Content-Type: text/plain; charset=ISO-8859-15
From: Richard Stallman <rms@gnu.org>
To: Bison Bugs <bug-bison@gnu.org>
In-reply-to: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr> (message
	from Akim Demaille on Tue, 5 Jun 2012 11:02:38 +0200)
Subject: Re: bison-2.5.1 released [stable]
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.10
X-Mailman-Approved-At: Tue, 05 Jun 2012 16:33:30 -0400
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: rms@gnu.org
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jun 2012 20:14:13 -0000

Congratulations on the new release.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call


From MAILER-DAEMON Thu Jun 07 13:48:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Scgop-0002ZS-TO
	for mharc-bug-bison@gnu.org; Thu, 07 Jun 2012 13:48:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60161)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScW9x-0006xn-0x
	for bug-bison@gnu.org; Thu, 07 Jun 2012 02:25:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScW9s-0007wL-Gj
	for bug-bison@gnu.org; Thu, 07 Jun 2012 02:25:28 -0400
Received: from smtp3-g21.free.fr ([212.27.42.3]:46775)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScW9r-0007vv-TQ
	for bug-bison@gnu.org; Thu, 07 Jun 2012 02:25:24 -0400
Received: from a7n8x-e.maison (unknown [82.236.101.3])
	by smtp3-g21.free.fr (Postfix) with ESMTP id F052CA626E;
	Thu,  7 Jun 2012 08:25:18 +0200 (CEST)
Received: from gesp by a7n8x-e.maison with local (Exim 4.72)
	(envelope-from <g.esp@free.fr>)
	id 1ScWSd-0000Bb-Sd; Thu, 07 Jun 2012 08:44:47 +0200
From: Gilles Espinasse <g.esp@free.fr>
To: bug-bison@gnu.org
Subject: [PATCH] Fix tests optimization removal code with -Os
Date: Thu,  7 Jun 2012 08:44:47 +0200
Message-Id: <1339051487-695-1-git-send-email-g.esp@free.fr>
X-Mailer: git-send-email 1.5.6.5
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 212.27.42.3
X-Mailman-Approved-At: Thu, 07 Jun 2012 13:48:23 -0400
Cc: Gilles Espinasse <g.esp@free.fr>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jun 2012 06:25:30 -0000

Looking my test log and using -Os, I saw code does not what comment say in -Os case.
Added g to sed rule as I am sure in the wild, that will happen to have more than once -O<x>

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
---
 tests/atlocal.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 7e4f2e2..bef5dd7 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -30,8 +30,8 @@ CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
 GCC='@GCC@'
 
 # We want no optimization.
-  O0CFLAGS=`echo '@CFLAGS@'   | sed 's/-O[0-9] *//'`
-O0CXXFLAGS=`echo '@CXXFLAGS@' | sed 's/-O[0-9] *//'`
+  O0CFLAGS=`echo '@CFLAGS@'   | sed 's/-O[s0-9] *//g'`
+O0CXXFLAGS=`echo '@CXXFLAGS@' | sed 's/-O[s0-9] *//g'`
 
 # Sometimes a test group needs to ignore gcc warnings, so it locally
 # sets CFLAGS to this.
-- 
1.5.6.5



From MAILER-DAEMON Thu Jun 07 13:48:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Scgop-0002Yx-Q9
	for mharc-bug-bison@gnu.org; Thu, 07 Jun 2012 13:48:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60019)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScW9Y-0006sx-I0
	for bug-bison@gnu.org; Thu, 07 Jun 2012 02:25:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScW9S-0007hc-6p
	for bug-bison@gnu.org; Thu, 07 Jun 2012 02:25:04 -0400
Received: from smtp3-g21.free.fr ([212.27.42.3]:45436)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScW9R-0007hK-Jj
	for bug-bison@gnu.org; Thu, 07 Jun 2012 02:24:58 -0400
Received: from a7n8x-e.maison (unknown [82.236.101.3])
	by smtp3-g21.free.fr (Postfix) with ESMTP id 06046A61E2;
	Thu,  7 Jun 2012 08:24:51 +0200 (CEST)
Received: from gesp by a7n8x-e.maison with local (Exim 4.72)
	(envelope-from <g.esp@free.fr>)
	id 1ScWSC-0000BA-LI; Thu, 07 Jun 2012 08:44:20 +0200
From: Gilles Espinasse <g.esp@free.fr>
To: bug-bison@gnu.org
Subject: [PATCH] Fix 2 typo
Date: Thu,  7 Jun 2012 08:44:20 +0200
Message-Id: <1339051460-668-1-git-send-email-g.esp@free.fr>
X-Mailer: git-send-email 1.5.6.5
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 212.27.42.3
X-Mailman-Approved-At: Thu, 07 Jun 2012 13:48:23 -0400
Cc: Gilles Espinasse <g.esp@free.fr>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jun 2012 06:25:05 -0000

s/prodecure/procedure/		while reading
s/contruction/construction/ 	found by git ls-files | misspellings -f

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
---
 README-hacking |    2 +-
 data/lalr1.cc  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README-hacking b/README-hacking
index 5d9314b..a4eb2d7 100644
--- a/README-hacking
+++ b/README-hacking
@@ -297,7 +297,7 @@ where F125BDF3 should be replaced with your key ID.
 *** Using gnupload
 You need "ncftp".
 
-At the end "make release" (or alpha/beta) will display the prodecure
+At the end "make release" (or alpha/beta) will display the procedure
 to run.  Just copy and paste it in your shell.
 
 *** By hand
diff --git a/data/lalr1.cc b/data/lalr1.cc
index 92f93c2..b8334e8 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -850,7 +850,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
       // Destroy a variant which value may have been swapped with
       // yylhs.value (for instance if the action was "std::swap($$,
       // $1)").  The value of yylhs.value (hence possibly one of these
-      // rhs symbols) depends on the default contruction for this
+      // rhs symbols) depends on the default construction for this
       // type.  In the case of pointers for instance, no
       // initialization is done, so the value is junk.  Therefore do
       // not try to report the value of symbols about to be destroyed
-- 
1.5.6.5



From MAILER-DAEMON Fri Jun 08 02:49:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sct0o-00016A-Hr
	for mharc-bug-bison@gnu.org; Fri, 08 Jun 2012 02:49:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41514)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sct0l-00014m-Q1
	for bug-bison@gnu.org; Fri, 08 Jun 2012 02:49:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sct0k-00048H-63
	for bug-bison@gnu.org; Fri, 08 Jun 2012 02:49:31 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:40638
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sct0k-00048A-0O
	for bug-bison@gnu.org; Fri, 08 Jun 2012 02:49:30 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sct0i-00078M-8c; Fri, 08 Jun 2012 08:49:28 +0200
Subject: Re: [PATCH] Fix tests optimization removal code with -Os
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=windows-1252
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <1339051487-695-1-git-send-email-g.esp@free.fr>
Date: Fri, 8 Jun 2012 08:49:29 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <9520C2FA-56D9-4BB5-A78B-AAF6B2DCA3C7@lrde.epita.fr>
References: <1339051487-695-1-git-send-email-g.esp@free.fr>
To: Gilles Espinasse <g.esp@free.fr>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Jun 2012 06:49:33 -0000

Hi Gilles,

Thanks for the feedback!

Le 7 juin 2012 =E0 08:44, Gilles Espinasse a =E9crit :

> Looking my test log and using -Os, I saw code does not what comment =
say in -Os case.

I remove -O2 because I failed to find a means to silence
GCC warnings in that case.  So it is really a known
*deficiency* to remove these flags, and the future
is to keep them.  So, unless it does change how the way
the test suite behaves, I'd rather not do that.

> Added g to sed rule as I am sure in the wild, that will happen to have =
more than once -O<x>

Good catch, thanks!

> 1.5.6.5

Wow=85  That's a collector!



From MAILER-DAEMON Fri Jun 08 06:48:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Scwjd-0007ps-1S
	for mharc-bug-bison@gnu.org; Fri, 08 Jun 2012 06:48:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45626)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScwjV-0007pQ-Rx
	for bug-bison@gnu.org; Fri, 08 Jun 2012 06:48:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScwjO-00089M-Vt
	for bug-bison@gnu.org; Fri, 08 Jun 2012 06:47:57 -0400
Received: from smtp4-g21.free.fr ([212.27.42.4]:54388)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1ScwjO-00088w-CR
	for bug-bison@gnu.org; Fri, 08 Jun 2012 06:47:50 -0400
Received: from zimbra33-e6.priv.proxad.net (unknown [172.20.243.183])
	by smtp4-g21.free.fr (Postfix) with ESMTP id A3B774C8035;
	Fri,  8 Jun 2012 12:47:43 +0200 (CEST)
Date: Fri, 8 Jun 2012 12:47:41 +0200 (CEST)
From: g.esp@free.fr
To: Akim Demaille <akim@lrde.epita.fr>
Message-ID: <1688381624.226466301.1339152461806.JavaMail.root@zimbra33-e6.priv.proxad.net>
In-Reply-To: <9520C2FA-56D9-4BB5-A78B-AAF6B2DCA3C7@lrde.epita.fr>
Subject: Re: [PATCH] Fix tests optimization removal code with -Os
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Originating-IP: [163.116.6.12]
X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598)
X-Authenticated-User: g.esp@free.fr
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 212.27.42.4
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Jun 2012 10:48:03 -0000



----- Mail original -----
> De: "Akim Demaille" <akim@lrde.epita.fr>
> =C3=80: "Gilles Espinasse" <g.esp@free.fr>
> Cc: bug-bison@gnu.org
> Envoy=C3=A9: Vendredi 8 Juin 2012 08:49:29
> Objet: Re: [PATCH] Fix tests optimization removal code with -Os
>=20
> Hi Gilles,
>=20
> Thanks for the feedback!
>=20
> Le 7 juin 2012 =C3=A0 08:44, Gilles Espinasse a =C3=A9crit :
>=20
> > Looking my test log and using -Os, I saw code does not what comment
> > say in -Os case.
>=20
> I remove -O2 because I failed to find a means to silence
> GCC warnings in that case.  So it is really a known
> *deficiency* to remove these flags, and the future
> is to keep them.  So, unless it does change how the way
> the test suite behaves, I'd rather not do that.
>=20

I understand. And I was a bit afraid -Wl,-O1 could match but that should be=
 only inside LDFLAGS, not CFLAGS

Without -Os filtered, I have no warnings with my gcc-4.4.5 and could have 0=
 failure on test suite.

I say I /could/ because tests 173 and 301 fail if build following actual LF=
S build order.
The reason is yet unclear, and I haven't yet look in details.
bison-2.5 test suite was fine with same package build order.


> > 1.5.6.5
>=20
> Wow=E2=80=A6  That's a collector!
>=20
>=20
This debian machine have been upgraded from lenny (v5) to squeeze(v6) many =
month ago.
Should have been debian squeeze git version but I see this is 1.7 in realit=
y.
Look my git package stay to old lenny version. I will look why this happen.
Thank.


Gilles


From MAILER-DAEMON Fri Jun 08 15:59:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sd5LI-00053K-3l
	for mharc-bug-bison@gnu.org; Fri, 08 Jun 2012 15:59:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59015)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1Sd5LF-00052G-Ju
	for bug-bison@gnu.org; Fri, 08 Jun 2012 15:59:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1Sd5LD-0006NO-Lw
	for bug-bison@gnu.org; Fri, 08 Jun 2012 15:59:29 -0400
Received: from smtp4-g21.free.fr ([212.27.42.4]:58019)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <g.esp@free.fr>) id 1Sd5LD-0006N2-2s
	for bug-bison@gnu.org; Fri, 08 Jun 2012 15:59:27 -0400
Received: from zimbra33-e6.priv.proxad.net (unknown [172.20.243.183])
	by smtp4-g21.free.fr (Postfix) with ESMTP id BD2DE4C80CA;
	Fri,  8 Jun 2012 21:59:20 +0200 (CEST)
Date: Fri, 8 Jun 2012 21:59:19 +0200 (CEST)
From: g.esp@free.fr
To: Akim Demaille <akim@lrde.epita.fr>
Message-ID: <1638707076.228187291.1339185559605.JavaMail.root@zimbra33-e6.priv.proxad.net>
In-Reply-To: <1688381624.226466301.1339152461806.JavaMail.root@zimbra33-e6.priv.proxad.net>
Subject: Re: [PATCH] Fix tests optimization removal code with -Os
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Originating-IP: [82.236.101.3]
X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598)
X-Authenticated-User: g.esp@free.fr
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 212.27.42.4
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Jun 2012 19:59:31 -0000



----- Mail original -----
> De: "g esp" <g.esp@free.fr>
> =C3=80: "Akim Demaille" <akim@lrde.epita.fr>
> Cc: bug-bison@gnu.org
> Envoy=C3=A9: Vendredi 8 Juin 2012 12:47:41
> Objet: Re: [PATCH] Fix tests optimization removal code with -Os
>=20
>=20
>=20
> ----- Mail original -----
> > De: "Akim Demaille" <akim@lrde.epita.fr>
> > =C3=80: "Gilles Espinasse" <g.esp@free.fr>
> > Cc: bug-bison@gnu.org
> > Envoy=C3=A9: Vendredi 8 Juin 2012 08:49:29
> > Objet: Re: [PATCH] Fix tests optimization removal code with -Os
> >=20
> > Hi Gilles,
> >=20
> > Thanks for the feedback!
> >=20
> > Le 7 juin 2012 =C3=A0 08:44, Gilles Espinasse a =C3=A9crit :
> >=20
> > > Looking my test log and using -Os, I saw code does not what
> > > comment
> > > say in -Os case.
> >=20
> > I remove -O2 because I failed to find a means to silence
> > GCC warnings in that case.  So it is really a known
> > *deficiency* to remove these flags, and the future
> > is to keep them.  So, unless it does change how the way
> > the test suite behaves, I'd rather not do that.
> >=20
>=20
> I understand. And I was a bit afraid -Wl,-O1 could match but that
> should be only inside LDFLAGS, not CFLAGS
>=20
> Without -Os filtered, I have no warnings with my gcc-4.4.5 and could
> have 0 failure on test suite.
>=20
> I say I /could/ because tests 173 and 301 fail if build following
> actual LFS build order.
> The reason is yet unclear, and I haven't yet look in details.
> bison-2.5 test suite was fine with same package build order.
>=20

Now I understand better.
I need to apply my patch to fix tests 173 and 301 failures because both pro=
duced .c code emitting various 'may be used uninitialized in this function'=
 warnings when -Os is not removed.

Gilles


From MAILER-DAEMON Mon Jun 11 04:55:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Se0PF-0005Yx-Q0
	for mharc-bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45025)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Se0PA-0005Yp-8r
	for bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Se0P3-0003Dw-U5
	for bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:19 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:59947
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Se0P3-0002zG-OC; Mon, 11 Jun 2012 04:55:13 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Se0OW-000332-I2; Mon, 11 Jun 2012 10:54:40 +0200
Subject: yacc.c does not prototype yyparse in the header
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FD236E7.6080609@gnu.org>
Date: Mon, 11 Jun 2012 10:54:51 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
To: Bison Bugs <bug-bison@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Jun 2012 08:55:24 -0000

Hi all,

Bruce Korb just pointed out to me that Bison 2.5.1 does
not prototype yyparse in the generated header, with yacc.c.
The other skeletons do.  I don't understand why.  I see
nothing in the documentation of Yacc that prevents this,
and surely this is troublesome for many uses.

I don't think there are problems here.  I guess we only have
to pay attention to handle %prefix via M4, and not via CPP,
to avoid having

#define yyparse fooparse

leak from the header (yet we could also #define it first,
then undefine at the end, in case one would like to use the
name "yyparse" in whatever export %code snippet; but do we
really need to cover this?  The less CPP, the better).

Am I missing something?



From MAILER-DAEMON Mon Jun 11 04:55:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Se0Pa-0005dg-5m
	for mharc-bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45101)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Se0PU-0005az-0C
	for bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Se0PN-0003GY-Sp
	for bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:39 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:59973
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Se0PN-0003GP-MP
	for bug-bison@gnu.org; Mon, 11 Jun 2012 04:55:33 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Se0PM-000332-Br; Mon, 11 Jun 2012 10:55:32 +0200
Subject: Re: [PATCH] Fix tests optimization removal code with -Os
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <1638707076.228187291.1339185559605.JavaMail.root@zimbra33-e6.priv.proxad.net>
Date: Mon, 11 Jun 2012 10:55:43 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <1B9FB821-3DCF-4A7F-BD5C-CB5FDF513F32@lrde.epita.fr>
References: <1638707076.228187291.1339185559605.JavaMail.root@zimbra33-e6.priv.proxad.net>
To: g.esp@free.fr
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Jun 2012 08:55:44 -0000


Le 8 juin 2012 =E0 21:59, g.esp@free.fr a =E9crit :

>>>> Looking my test log and using -Os, I saw code does not what
>>>> comment
>>>> say in -Os case.
>>>=20
>>> I remove -O2 because I failed to find a means to silence
>>> GCC warnings in that case.  So it is really a known
>>> *deficiency* to remove these flags, and the future
>>> is to keep them.  So, unless it does change how the way
>>> the test suite behaves, I'd rather not do that.
>>>=20
> Now I understand better.
> I need to apply my patch to fix tests 173 and 301 failures because =
both produced .c code emitting various 'may be used uninitialized in =
this function' warnings when -Os is not removed.

OK, I will install that change then, thanks!



From MAILER-DAEMON Mon Jun 11 05:30:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Se0wk-0003eV-NP
	for mharc-bug-bison@gnu.org; Mon, 11 Jun 2012 05:30:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45716)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Se0wd-0003dq-0Z
	for bug-bison@gnu.org; Mon, 11 Jun 2012 05:30:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Se0wY-0002CA-CK
	for bug-bison@gnu.org; Mon, 11 Jun 2012 05:29:54 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:38634)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1Se0wS-0002Aj-Ir; Mon, 11 Jun 2012 05:29:44 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id B7AE4A60004;
	Mon, 11 Jun 2012 02:29:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id L+-p--ZZUSXS; Mon, 11 Jun 2012 02:29:42 -0700 (PDT)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 5979FA60002;
	Mon, 11 Jun 2012 02:29:42 -0700 (PDT)
Message-ID: <4FD5BA89.0@cs.ucla.edu>
Date: Mon, 11 Jun 2012 02:29:45 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: yacc.c does not prototype yyparse in the header
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
In-Reply-To: <554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Jun 2012 09:30:00 -0000

On 06/11/2012 01:54 AM, Akim Demaille wrote:
> Bruce Korb just pointed out to me that Bison 2.5.1 does
> not prototype yyparse in the generated header, with yacc.c.
> The other skeletons do.  I don't understand why.

This is for historical reasons, as Bison
historically generated parsers that compiled with
traditional C compilers that did not support prototypes.
Nowadays that is no longer a concern, and yyparse can
use prototypes unconditionally.

> I guess we only have
> to pay attention to handle %prefix via M4, and not via CPP

I would think so, yes.


From MAILER-DAEMON Tue Jun 12 09:40:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeRKo-0001tI-ND
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 09:40:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54583)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRKW-0001sI-SD
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:40:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRKM-0002zK-B6
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:40:20 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:34879
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRKM-0002yb-5D
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:40:10 -0400
Received: from [192.168.105.43] by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRKK-0006sQ-Q5; Tue, 12 Jun 2012 15:40:08 +0200
Subject: Re: [PATCH] Fix 2 typo
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <1339051460-668-1-git-send-email-g.esp@free.fr>
Date: Tue, 12 Jun 2012 15:40:09 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <3EB5E048-9612-4A36-AC01-863979D0C3AA@lrde.epita.fr>
References: <1339051460-668-1-git-send-email-g.esp@free.fr>
To: Gilles Espinasse <g.esp@free.fr>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 13:40:36 -0000


Le 7 juin 2012 =E0 08:44, Gilles Espinasse a =E9crit :

> s/prodecure/procedure/		while reading
> s/contruction/construction/ 	found by git ls-files | misspellings -f

I installed the following in maint (contruction
is in master only, it needs to be done in another fix).

=46rom 6537c71fcc74ee3401b2ccf5434b1fa2a470bd84 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Fri, 8 Jun 2012 09:00:58 +0200
Subject: [PATCH 2/6] maint: fix spello.

* README-hacking: Here.
* THANKS: Reported by Gilles Espinasse.
---
 README-hacking |    2 +-
 THANKS         |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/README-hacking b/README-hacking
index cfb4b31..5fab96c 100644
--- a/README-hacking
+++ b/README-hacking
@@ -272,7 +272,7 @@ where F125BDF3 should be replaced with your key ID.
 *** Using gnupload
 You need "ncftp".
=20
-At the end "make stable" (or alpha/beta) will display the prodecure to
+At the end "make stable" (or alpha/beta) will display the procedure to
 run.  Just copy and paste it in your shell.
=20
 *** By hand
diff --git a/THANKS b/THANKS
index e3bf221..284c5a9 100644
--- a/THANKS
+++ b/THANKS
@@ -43,6 +43,7 @@ Frank Heckenbach          frank@g-n-u.de
 Frans Englich             frans.englich@telia.com
 Georg Sauthoff            gsauthof@TechFak.Uni-Bielefeld.DE
 George Neuner             gneuner2@comcast.net
+Gilles Espinasse          g.esp@free.fr
 Goran Uddeborg            goeran@uddeborg.se
 Guido Trentalancia        trentalg@aston.ac.uk
 H. Merijn Brand           h.m.brand@hccnet.nl
--=20
1.7.10.4




From MAILER-DAEMON Tue Jun 12 09:41:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeRLU-0001xs-SN
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 09:41:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55053)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRLN-0001x5-Ms
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:41:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRLH-0003k9-DX
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:41:13 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:34892
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRLH-0003jJ-7E
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:41:07 -0400
Received: from [192.168.105.43] by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRLF-0006sQ-Te; Tue, 12 Jun 2012 15:41:05 +0200
Subject: Re: [PATCH] Fix tests optimization removal code with -Os
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <1B9FB821-3DCF-4A7F-BD5C-CB5FDF513F32@lrde.epita.fr>
Date: Tue, 12 Jun 2012 15:41:07 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <1B0BC189-C616-444F-8D2D-2C6EB03FC6F4@lrde.epita.fr>
References: <1638707076.228187291.1339185559605.JavaMail.root@zimbra33-e6.priv.proxad.net>
	<1B9FB821-3DCF-4A7F-BD5C-CB5FDF513F32@lrde.epita.fr>
To: g.esp@free.fr
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 13:41:19 -0000


Le 11 juin 2012 =E0 10:55, Akim Demaille a =E9crit :

> OK, I will install that change then, thanks!

I just installed this in maint.

=46rom 02287ec65002d4967927ba3cf22f6fdc634c4291 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Fri, 8 Jun 2012 09:02:09 +0200
Subject: [PATCH 3/6] tests: remove all the -On flags.

* tests/atlocal.in: Here.
Reported by Gilles Espinasse.
---
 tests/atlocal.in |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 72a9bf7..7302209 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -29,9 +29,11 @@ CPPFLAGS=3D"-I$abs_top_builddir/lib @CPPFLAGS@"
 # Is the compiler GCC?
 GCC=3D'@GCC@'
=20
-# We want no optimization.
-  O0CFLAGS=3D`echo '@CFLAGS@'   | sed 's/-O[0-9] *//'`
-O0CXXFLAGS=3D`echo '@CXXFLAGS@' | sed 's/-O[0-9] *//'`
+# We want no optimization, as they uncover warnings (therefore,
+# failures) about uninitialized variables in the test suite.  FIXME:
+# fix the warnings, not the flags.
+  O0CFLAGS=3D`echo '@CFLAGS@'   | sed 's/-O[0-9s] *//g'`
+O0CXXFLAGS=3D`echo '@CXXFLAGS@' | sed 's/-O[0-9s] *//g'`
=20
 # Sometimes a test group needs to ignore gcc warnings, so it locally
 # sets CFLAGS to this.
--=20
1.7.10.4



From MAILER-DAEMON Tue Jun 12 09:54:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeRYG-00016S-Pn
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 09:54:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37190)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRYE-00016G-2i
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:54:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRY3-0003O3-7A
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:54:29 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:40383
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRY3-0003L7-0l; Tue, 12 Jun 2012 09:54:19 -0400
Received: from [192.168.105.43] by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRXx-0007ON-Ki; Tue, 12 Jun 2012 15:54:16 +0200
Subject: Re: yacc.c does not prototype yyparse in the header
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FD5BA89.0@cs.ucla.edu>
Date: Tue, 12 Jun 2012 15:54:11 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<4FD5BA89.0@cs.ucla.edu>
To: Paul Eggert <eggert@cs.ucla.edu>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 13:54:31 -0000


Le 11 juin 2012 =E0 11:29, Paul Eggert a =E9crit :

> On 06/11/2012 01:54 AM, Akim Demaille wrote:
>> Bruce Korb just pointed out to me that Bison 2.5.1 does
>> not prototype yyparse in the generated header, with yacc.c.
>> The other skeletons do.  I don't understand why.
>=20
> This is for historical reasons, as Bison
> historically generated parsers that compiled with
> traditional C compilers that did not support prototypes.
> Nowadays that is no longer a concern, and yyparse can
> use prototypes unconditionally.
>=20
>> I guess we only have
>> to pay attention to handle %prefix via M4, and not via CPP
>=20
> I would think so, yes.

hi Paul,

There are two issues that annoy me on this regard.

First, there are no CPP guards used in our generated headers
(for yacc.c).  I would very much like them to have some, especially
because in some cases it might help us simplify some of the "inner"
guards we have (to avoid multiple definitions of the same
typedefs for instance).

Second, I never really paid attention to this before,
but how on earth can it be really useful to rename the
global variables (--name-prefix) such as yylval, global
functions, such as yyparse, but not the global types, such as
YYSTYPE???  Today, with --name-prefix=3Dfoo, one reads in the
generated header:

> #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
> typedef union YYSTYPE
> {
>   int ival;
> } YYSTYPE;
> # define YYSTYPE_IS_TRIVIAL 1
> # define yystype YYSTYPE /* obsolescent; will be withdrawn */
> # define YYSTYPE_IS_DECLARED 1
> #endif
>=20
> extern YYSTYPE foolval;

Am I missing something, or is this the sign that surely, no
one really uses several parsers within a single application?
Well, at least, not from a single compilation unit, but
really, how about addressing this shortcoming?



From MAILER-DAEMON Tue Jun 12 09:57:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeRar-0002JW-DX
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 09:57:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43962)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRak-0002IK-Qj
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:57:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRae-0004qj-8r
	for bug-bison@gnu.org; Tue, 12 Jun 2012 09:57:06 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:42557
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRad-0004pi-Vh; Tue, 12 Jun 2012 09:57:00 -0400
Received: from [192.168.105.43] by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRaX-0007Zt-IM; Tue, 12 Jun 2012 15:56:57 +0200
Subject: FYI: glr.c: minor refactoring (was: yacc.c does not prototype yyparse
	in the header)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
Date: Tue, 12 Jun 2012 15:56:38 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <2E56B8AB-0B7F-420E-BF80-B37701F4DFCF@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 13:57:12 -0000


Le 11 juin 2012 =E0 10:54, Akim Demaille a =E9crit :

> Bruce Korb just pointed out to me that Bison 2.5.1 does
> not prototype yyparse in the generated header, with yacc.c.
> The other skeletons do.  I don't understand why.  I see
> nothing in the documentation of Yacc that prevents this,
> and surely this is troublesome for many uses.

Refactoring is needed beforehand.  First of these, a simple
one, made to have glr.c and yacc.c share a more common
structure.  Already installed in maint.


=46rom e9807a79348dee60a4d83c2b1281e9e3678b8287 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 12 Jun 2012 09:27:12 +0200
Subject: [PATCH] glr.c: minor refactoring.

* data/glr.c (b4_shared_declarations): Move from the generated file
section, to the M4 prologue.
---
 data/glr.c |   74 =
++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 39 insertions(+), 35 deletions(-)

diff --git a/data/glr.c b/data/glr.c
index 5f7aac8..7588bd1 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -154,43 +154,14 @@ m4_define([b4_rhs_location],
 [(((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - =
($1))@}.yystate.yyloc)])
=20
=20
-
 ## -------------- ##
-## Output files.  ##
+## Declarations.  ##
 ## -------------- ##
=20
-# We do want M4 expansion after # for CPP macros.
-m4_changecom()
-m4_divert_push(0)dnl
-@output(b4_parser_file_name@)@
-b4_copyright([Skeleton implementation for Bison GLR parsers in C],
-             [2002-2012])
-[
-/* C GLR parser skeleton written by Paul Hilfinger.  */
-
-]b4_identification
-
-b4_percent_code_get([[top]])[]dnl
-m4_if(b4_prefix, [yy], [],
-[/* Substitute the variable and function names.  */
-#define yyparse b4_prefix[]parse
-#define yylex   b4_prefix[]lex
-#define yyerror b4_prefix[]error
-#define yylval  b4_prefix[]lval
-#define yychar  b4_prefix[]char
-#define yydebug b4_prefix[]debug
-#define yynerrs b4_prefix[]nerrs
-#define yylloc  b4_prefix[]lloc])[
-
-/* Copy the first part of user declarations.  */
-]b4_user_pre_prologue
-
-b4_null_define
-
-dnl # b4_shared_declarations
-dnl # ----------------------
-dnl # Declaration that might either go into the header (if --defines)
-dnl # or open coded in the parser body.
+# b4_shared_declarations
+# ----------------------
+# Declaration that might either go into the header (if --defines)
+# or open coded in the parser body.
 m4_define([b4_shared_declarations],
 [b4_percent_code_get([[requires]])[]dnl
=20
@@ -223,7 +194,40 @@ typedef struct YYLTYPE
 ]b4_percent_code_get([[provides]])[]dnl
 ])
=20
-b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
+
+## -------------- ##
+## Output files.  ##
+## -------------- ##
+
+# We do want M4 expansion after # for CPP macros.
+m4_changecom()
+m4_divert_push(0)dnl
+@output(b4_parser_file_name@)@
+b4_copyright([Skeleton implementation for Bison GLR parsers in C],
+             [2002-2012])
+[
+/* C GLR parser skeleton written by Paul Hilfinger.  */
+
+]b4_identification
+
+b4_percent_code_get([[top]])[]dnl
+m4_if(b4_prefix, [yy], [],
+[/* Substitute the variable and function names.  */
+#define yyparse b4_prefix[]parse
+#define yylex   b4_prefix[]lex
+#define yyerror b4_prefix[]error
+#define yylval  b4_prefix[]lval
+#define yychar  b4_prefix[]char
+#define yydebug b4_prefix[]debug
+#define yynerrs b4_prefix[]nerrs
+#define yylloc  b4_prefix[]lloc])[
+
+/* Copy the first part of user declarations.  */
+]b4_user_pre_prologue[
+
+]b4_null_define[
+
+]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
               [b4_shared_declarations])[
=20
 /* Enabling traces.  */
--=20
1.7.10.4




From MAILER-DAEMON Tue Jun 12 10:09:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeRmQ-0005lD-MU
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 10:09:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54490)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRmI-0005jn-4Z
	for bug-bison@gnu.org; Tue, 12 Jun 2012 10:09:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeRmC-0002bS-8L
	for bug-bison@gnu.org; Tue, 12 Jun 2012 10:09:01 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:37399
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRmB-0002aN-Vl; Tue, 12 Jun 2012 10:08:56 -0400
Received: from [192.168.105.43] by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeRkA-0007pN-82; Tue, 12 Jun 2012 16:08:53 +0200
Subject: FYI: skeletons: factor yacc.c and glr.c (was: yacc.c does not
	prototype yyparse in the header)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
Date: Tue, 12 Jun 2012 16:02:54 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <AF7ADA72-26DA-4F67-B551-29330F047214@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 14:09:10 -0000

Hi all,

Le 11 juin 2012 =E0 10:54, Akim Demaille a =E9crit :

> Bruce Korb just pointed out to me that Bison 2.5.1 does
> not prototype yyparse in the generated header, with yacc.c.
> The other skeletons do.  I don't understand why.  I see
> nothing in the documentation of Yacc that prevents this,
> and surely this is troublesome for many uses.

Again, instead of duplicating even more code in maint (to declare
yyparse in the generated header), I refactored bits of yacc.c and
glr.c.

=46rom c0828abf9d81ce665d5dc9b5a2b2062e267d4114 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 12 Jun 2012 10:55:18 +0200
Subject: [PATCH] skeletons: factor yacc.c and glr.c.

yacc.c and glr.c share common declarations.  Their YYLTYPE are exactly
equal, and their YYSTYPE are sufficiently alike to be fused (its
declaration was protected by YYSTYPE_IS_DECLARED in yacc.c, but not in
glr.c).  Besides, yacc.c duplicated the definitions of YYLTYPE and
YYSTYPE (*.h/*.c).

* data/c.m4 (b4_declare_yylstype): New.
* data/yacc.c, data/glr.c: Use it.
---
 data/c.m4   |   37 +++++++++++++++++++++++++
 data/glr.c  |   31 +++------------------
 data/yacc.c |   86 =
++++++++++-------------------------------------------------
 3 files changed, 54 insertions(+), 100 deletions(-)

diff --git a/data/c.m4 b/data/c.m4
index b49d6dc..64f68fe 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -530,3 +530,40 @@ b4_locations_if([, yylocationp])[]b4_user_args[);
   YYFPRINTF (yyoutput, ")");
 }]dnl
 ])
+
+## -------------- ##
+## Declarations.  ##
+## -------------- ##
+
+# b4_declare_yylstype
+# ------------------
+# Declaration that might either go into the header (if --defines)
+# or open coded in the parser body.  Declare YYSTYPE and YYLTYPE.
+m4_define([b4_declare_yylstype],
+[[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+]m4_ifdef([b4_stype],
+[[typedef union ]b4_union_name[
+{
+]b4_user_stype[
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]],
+[m4_if(b4_tag_seen_flag, 0,
+[[typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]])])[
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif]b4_locations_if([[
+
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} YYLTYPE;
+# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif]])
+])
diff --git a/data/glr.c b/data/glr.c
index 7588bd1..7ebc65c 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -163,34 +163,9 @@ m4_define([b4_rhs_location],
 # Declaration that might either go into the header (if --defines)
 # or open coded in the parser body.
 m4_define([b4_shared_declarations],
-[b4_percent_code_get([[requires]])[]dnl
-
-b4_token_enums(b4_tokens)
-
-[#ifndef YYSTYPE
-]m4_ifdef([b4_stype],
-[[typedef union ]b4_union_name[
-{
-]b4_user_stype[
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1]],
-[m4_if(b4_tag_seen_flag, 0,
-[[typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1]])])[
-#endif
-]b4_locations_if([[
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-]])[
+[b4_percent_code_get([[requires]])[
+]b4_token_enums(b4_tokens)[
+]b4_declare_yylstype[
 ]b4_percent_code_get([[provides]])[]dnl
 ])
=20
diff --git a/data/yacc.c b/data/yacc.c
index dbaff87..5ba271c 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -158,9 +158,9 @@ m4_define([b4_rhs_location],
 [(yylsp@{($2) - ($1)@})])
=20
=20
-## ------------------ ##
-## Parser variables.  ##
-## ------------------ ##
+## -------------- ##
+## Declarations.  ##
+## -------------- ##
=20
 # b4_declare_scanner_communication_variables
 # ------------------------------------------
@@ -224,10 +224,9 @@ m4_define([b4_declare_parser_state_variables], =
[b4_pure_if([[
     yytype_int16 *yyes;
     YYSIZE_T yyes_capacity;]])])
=20
-
-## --------------------------------------------------------- ##
-## Defining symbol actions, e.g., printers and destructors.  ##
-## --------------------------------------------------------- ##
+## -------------- ##
+## Output files.  ##
+## -------------- ##
=20
 # We do want M4 expansion after # for CPP macros.
 m4_changecom()
@@ -287,37 +286,10 @@ m4_if(b4_prefix, [yy], [],
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
=20
-]b4_percent_code_get([[requires]])[]dnl
-
-b4_token_enums_defines(b4_tokens)[
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-]m4_ifdef([b4_stype],
-[[typedef union ]b4_union_name[
-{
-]b4_user_stype[
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1]],
-[m4_if(b4_tag_seen_flag, 0,
-[[typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1]])])[
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif]b4_locations_if([[
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif]])b4_push_if([[
-
+]b4_percent_code_get([[requires]])[
+]b4_token_enums_defines(b4_tokens)[
+]b4_declare_yylstype[
+]b4_push_if([[
 #ifndef YYPUSH_DECLS
 #  define YYPUSH_DECLS
 struct yypstate;
@@ -2076,40 +2048,10 @@ b4_copyright([Bison interface for Yacc-like =
parsers in C],
=20
 b4_percent_code_get([[requires]])[]dnl
=20
-b4_token_enums_defines(b4_tokens)
-
-[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-]m4_ifdef([b4_stype],
-[[typedef union ]b4_union_name[
-{
-]b4_user_stype[
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1]],
-[m4_if(b4_tag_seen_flag, 0,
-[[typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1]])])[
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;]])
-
-b4_locations_if(
-[#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]])
-)dnl b4_locations_if
+b4_token_enums_defines(b4_tokens)[
+]b4_declare_yylstype[
+]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;
+]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])dnl
 b4_push_if([[
 #ifndef YYPUSH_DECLS
 #  define YYPUSH_DECLS
--=20
1.7.10.4




From MAILER-DAEMON Tue Jun 12 12:07:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeTcS-0006cL-Qw
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 12:07:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42237)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeTcD-0006Yj-AY
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:06:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeTc6-0004LQ-59
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:06:44 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:54421
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeTc5-0004KK-SJ; Tue, 12 Jun 2012 12:06:38 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165] helo=[192.168.105.43])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeTc1-00065V-Uh; Tue, 12 Jun 2012 18:06:34 +0200
Subject: RFC: yacc.c: factor (was: yacc.c does not prototype yyparse in the
	header)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
Date: Tue, 12 Jun 2012 16:07:54 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 16:06:59 -0000


Le 11 juin 2012 =E0 10:54, Akim Demaille a =E9crit :

> Bruce Korb just pointed out to me that Bison 2.5.1 does
> not prototype yyparse in the generated header, with yacc.c.
> The other skeletons do.  I don't understand why.  I see
> nothing in the documentation of Yacc that prevents this,
> and surely this is troublesome for many uses.

Third act of refactoring.  This time it is not installed
yet, as I would appreciate some opinion, as the generated
code is somewhat different:

  The main difference is that in the *.c file we used the yy*
  names (as %prefix is handled by "#define yy* <prefix>*" before), while
  the *.hh used <prefix>* names.  Keep only the later.

I don't think we care, but someone might have a different
opinion.

=46rom b97378c27c24bcf6b249447419c3abe7c2c0b555 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 12 Jun 2012 14:40:18 +0200
Subject: [PATCH] yacc.c: factor.

yacc.c used to include two almost identical sections, used in the
header when %defines is set, otherwise in the generated implementation
file.  The main difference is that in the *.c file we used the yy*
names (as %prefix is handled by "#define yy* <prefix>*" before), while
the *.hh used <prefix>* names.  Keep only the later.  If this is
troublesome, b4_shared_declarations can easily take the desired prefix
as argument.

* data/yacc.c (b4_shared_declarations): New.
Use it to factor duplicated declarations.
---
 data/yacc.c |   93 =
++++++++++++++++++++++++-----------------------------------
 1 file changed, 37 insertions(+), 56 deletions(-)

diff --git a/data/yacc.c b/data/yacc.c
index 5ba271c..6480d1a 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -224,6 +224,39 @@ m4_define([b4_declare_parser_state_variables], =
[b4_pure_if([[
     yytype_int16 *yyes;
     YYSIZE_T yyes_capacity;]])])
=20
+
+# b4_shared_declarations
+# ----------------------
+# Declaration that might either go into the header (if --defines)
+# or open coded in the parser body.
+m4_define([b4_shared_declarations],
+[b4_percent_code_get([[requires]])[
+]b4_token_enums_defines(b4_tokens)[
+]b4_declare_yylstype[
+]b4_push_if([[
+#ifndef YYPUSH_DECLS
+#  define YYPUSH_DECLS
+typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
+enum { YYPUSH_MORE =3D 4 };
+]b4_pull_if([b4_c_function_decl([b4_prefix[parse]], [[int]], =
b4_parse_param)
+])b4_c_function_decl([b4_prefix[push_parse]], [[int]],
+  [[b4_prefix[pstate *yyps]], [[yyps]]]b4_pure_if([,
+  [[[int yypushed_char]], [[yypushed_char]]],
+  [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
+  [[[YYLTYPE const *yypushed_loc]], =
[[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
+  b4_parse_param]))
+b4_pull_if([b4_c_function_decl([b4_prefix[pull_parse]], [[int]],
+  [[b4_prefix[pstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
+  b4_parse_param]))])
+b4_c_function_decl([b4_prefix[pstate_new]], [b4_prefix[pstate *]],
+                    [[[void]], []])
+b4_c_function_decl([b4_prefix[pstate_delete]], [[void]],
+                   [[b4_prefix[pstate *yyps]], [[yyps]]])[
+#endif
+]])
+b4_percent_code_get([[provides]])[]dnl
+])
+
 ## -------------- ##
 ## Output files.  ##
 ## -------------- ##
@@ -286,34 +319,9 @@ m4_if(b4_prefix, [yy], [],
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
=20
-]b4_percent_code_get([[requires]])[
-]b4_token_enums_defines(b4_tokens)[
-]b4_declare_yylstype[
-]b4_push_if([[
-#ifndef YYPUSH_DECLS
-#  define YYPUSH_DECLS
-struct yypstate;
-typedef struct yypstate yypstate;
-enum { YYPUSH_MORE =3D 4 };
+]b4_shared_declarations[
=20
-]b4_pull_if([b4_c_function_decl([[yyparse]], [[int]], b4_parse_param)
-])b4_c_function_decl([[yypush_parse]], [[int]],
-  [[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
-  [[[int yypushed_char]], [[yypushed_char]]],
-  [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
-  [[[YYLTYPE const *yypushed_loc]], =
[[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
-  b4_parse_param]))
-b4_pull_if([b4_c_function_decl([[yypull_parse]], [[int]],
-  [[[yypstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
-  b4_parse_param]))])
-b4_c_function_decl([[yypstate_new]], [[yypstate *]], [[[void]], []])
-b4_c_function_decl([[yypstate_delete]], [[void]],
-                   [[[yypstate *yyps]], [[yyps]]])[
-#endif]])
-
-b4_percent_code_get([[provides]])[]dnl
-
-[/* Copy the second part of user declarations.  */
+/* Copy the second part of user declarations.  */
 ]b4_user_post_prologue
 b4_percent_code_get[]dnl
=20
@@ -2044,36 +2052,9 @@ yypushreturn:]])[
 b4_defines_if(
 [@output(b4_spec_defines_file@)@
 b4_copyright([Bison interface for Yacc-like parsers in C],
-             [1984, 1989-1990, 2000-2012])
-
-b4_percent_code_get([[requires]])[]dnl
-
-b4_token_enums_defines(b4_tokens)[
-]b4_declare_yylstype[
+             [1984, 1989-1990, 2000-2012])[
+]b4_shared_declarations[
 ]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;
 ]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])dnl
-b4_push_if([[
-#ifndef YYPUSH_DECLS
-#  define YYPUSH_DECLS
-struct ]b4_prefix[pstate;
-typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
-enum { YYPUSH_MORE =3D 4 };
-]b4_pull_if([b4_c_function_decl([b4_prefix[parse]], [[int]], =
b4_parse_param)
-])b4_c_function_decl([b4_prefix[push_parse]], [[int]],
-  [[b4_prefix[pstate *yyps]], [[yyps]]]b4_pure_if([,
-  [[[int yypushed_char]], [[yypushed_char]]],
-  [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
-  [[[YYLTYPE const *yypushed_loc]], =
[[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
-  b4_parse_param]))
-b4_pull_if([b4_c_function_decl([b4_prefix[pull_parse]], [[int]],
-  [[b4_prefix[pstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
-  b4_parse_param]))])
-b4_c_function_decl([b4_prefix[pstate_new]], [b4_prefix[pstate *]],
-                    [[[void]], []])
-b4_c_function_decl([b4_prefix[pstate_delete]], [[void]],
-                   [[b4_prefix[pstate *yyps]], [[yyps]]])[
-#endif
-]])
-b4_percent_code_get([[provides]])[]dnl
 ])dnl b4_defines_if
 m4_divert_pop(0)
--=20
1.7.10.4




From MAILER-DAEMON Tue Jun 12 12:25:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeTu4-0004rL-5i
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 12:25:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42002)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeTty-0004l8-Dv
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:25:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SeTts-00061S-2K
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:25:05 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:35377
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeTtr-00060h-Pq; Tue, 12 Jun 2012 12:24:59 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SeTtp-0006lD-Hf; Tue, 12 Jun 2012 18:24:57 +0200
Subject: Re: RFC: yacc.c: factor (was: yacc.c does not prototype yyparse in
	the header)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
Date: Tue, 12 Jun 2012 18:24:59 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 16:25:10 -0000


Le 12 juin 2012 =E0 16:07, Akim Demaille a =E9crit :

> Third act of refactoring.  This time it is not installed
> yet, as I would appreciate some opinion, as the generated
> code is somewhat different:

Fourth step.  This introduces a weakness in Bison: when
given arguments such as

	--output=3Dsub1/foo.c --defines=3Dsub2/foo.h

then sub1/foo.c features '#include "sub2/foo.h"'.  But we actually
already have this problem in glr.c which already prefers to include
the header instead of duplicating its content.

So we really need to be able to compute "relative" paths here, to
be addressed in the near future.

Ok to install?

=46rom 8fc5d55074347b52796ffe8e36f75245caf10485 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 12 Jun 2012 16:15:14 +0200
Subject: [PATCH 1/2] yacc.c: instead of duplicating y.tab.h inside =
y.tac.c,
 include it.

This is already what we do in glr.c.

* data/yacc.c: here.
---
 NEWS        |   14 ++++++++++++++
 data/yacc.c |    3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 393538c..fd51b61 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,20 @@ GNU Bison NEWS
=20
 * Noteworthy changes in release ?.? (????-??-??) [?]
=20
+** Future changes:
+
+  The next major release will drop support for generating parsers in =
K&R C,
+  and remove the definition of yystype (removal announced since Bison
+  1.875).
+
+** Changes in regular C parsers (yacc.c):
+
+*** The generated header is included
+
+  Instead of duplicating the content of the generated header =
(definition of
+  YYSTYPE, yyltype etc.), the generated parser now includes it, as was
+  already the case for GLR or C++ parsers.
+
 * Noteworthy changes in release 2.5.1 (2012-06-05) [stable]
=20
 ** Future changes:
diff --git a/data/yacc.c b/data/yacc.c
index 079e488..e88b4e0 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -319,7 +319,8 @@ m4_if(b4_prefix, [yy], [],
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
=20
-]b4_shared_declarations[
+]b4_defines_if([[#include "]b4_spec_defines_file["]],
+               [b4_shared_declarations])[
=20
 /* Copy the second part of user declarations.  */
 ]b4_user_post_prologue
--=20
1.7.10.4




From MAILER-DAEMON Tue Jun 12 12:25:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeTup-0005QA-II
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 12:25:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42231)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1SeTun-0005OJ-4H
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:25:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1SeTub-0006fV-Cz
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:25:56 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61850)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1SeTub-0006dD-39; Tue, 12 Jun 2012 12:25:45 -0400
Received: by bkcjm19 with SMTP id jm19so5700603bkc.0
	for <multiple recipients>; Tue, 12 Jun 2012 09:25:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=X+Is9a72e5iRNvKujtsPvKrbGG8bJoJCLnAZqzPXPok=;
	b=vTGGyqF6Cj33tsR5N3A7cedUgHksGh9xX1QVSGtHR2O5RjA9Tt3zgoDUyezTusiAEC
	qcoO/6PVuOH3whSm75kZCtfSLz7s/5zbZ7JwhMWjLXrwQLn7TroRX1qXfzNRwJQc5OS1
	SR0kSgpvRYtt8HNSL7AGKPjZ+m/grnWK9Xr26UdQ05Y8Cc6boTG7IEnoMmC6vn2dD9QO
	SC1DNT3AR7aaxt+smRdJqB50dxUZWAD9+/QcK1D4BJnIbBXHbVN0QfBS7JmDo2lnJa87
	a2xXsXfV/Ngx7JC8OgsdHZv+oUJYU9mood+b4nbO/Q9zw/9VR1768w8BO8hoC+tpO6hI
	qZWA==
Received: by 10.204.136.195 with SMTP id s3mr4066786bkt.117.1339518341141;
	Tue, 12 Jun 2012 09:25:41 -0700 (PDT)
Received: from [87.8.100.121]
	(host121-100-dynamic.8-87-r.retail.telecomitalia.it. [87.8.100.121])
	by mx.google.com with ESMTPS id x23sm21104784bkw.12.2012.06.12.09.25.39
	(version=SSLv3 cipher=OTHER); Tue, 12 Jun 2012 09:25:40 -0700 (PDT)
Message-ID: <4FD76D80.1080009@gmail.com>
Date: Tue, 12 Jun 2012 18:25:36 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: RFC: yacc.c: factor
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
In-Reply-To: <CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bison Bugs <bug-bison@gnu.org>,
	Bruce Korb <bkorb@gnu.org>, Bison Patches <bison-patches@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 16:25:58 -0000

Hi Akim.

While I don't feel qualified in commenting on the change proper, I can ...

On 06/12/2012 04:07 PM, Akim Demaille wrote:
> 
> Subject: [PATCH] yacc.c: factor.
> 
> yacc.c used to include two almost identical sections, used in the
> header when %defines is set, otherwise in the generated implementation
> file.  The main difference is that in the *.c file we used the yy*
> names (as %prefix is handled by "#define yy* <prefix>*" before), while
> the *.hh used <prefix>* names.  Keep only the later.
>
... spot this typos: s/later/latter/.

> If this is
> troublesome, b4_shared_declarations can easily take the desired prefix
> as argument.
> 
Regards,
  Stefano


From MAILER-DAEMON Tue Jun 12 12:41:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeU9l-0002wF-FP
	for mharc-bug-bison@gnu.org; Tue, 12 Jun 2012 12:41:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43043)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1SeU9j-0002w7-0q
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:41:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1SeU9h-0005Rr-Fd
	for bug-bison@gnu.org; Tue, 12 Jun 2012 12:41:22 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:53364)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1SeU9a-0005Os-6L; Tue, 12 Jun 2012 12:41:14 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id CBBF339E8008;
	Tue, 12 Jun 2012 09:41:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 7sAN47MciFYt; Tue, 12 Jun 2012 09:41:10 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 49F9939E8007;
	Tue, 12 Jun 2012 09:41:10 -0700 (PDT)
Message-ID: <4FD77125.2070807@cs.ucla.edu>
Date: Tue, 12 Jun 2012 09:41:09 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: yacc.c does not prototype yyparse in the header
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<4FD5BA89.0@cs.ucla.edu>
	<59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
In-Reply-To: <59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jun 2012 16:41:24 -0000

On 06/12/2012 06:54 AM, Akim Demaille wrote:
> First, there are no CPP guards used in our generated headers
> (for yacc.c).  I would very much like them to have some, especially
> because in some cases it might help us simplify some of the "inner"
> guards we have (to avoid multiple definitions of the same
> typedefs for instance).

Sure, that makes sense.

> Second, I never really paid attention to this before,
> but how on earth can it be really useful to rename the
> global variables (--name-prefix) such as yylval, global
> functions, such as yyparse, but not the global types, such as
> YYSTYPE?

This "works" because different modules can include different
parser.h files.  So long as no single module includes both
parser.h files, there is no clash at compile-time; and there
is no clash at link-time because types are invisible to the
linker.  But it clearly would be better to do as you suggest
and to apply the prefix to the types as well -- that
would support programs where a single module wants to include
two parser.h files (something that does not work now).


From MAILER-DAEMON Wed Jun 13 02:35:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SehAv-0002U4-E0
	for mharc-bug-bison@gnu.org; Wed, 13 Jun 2012 02:35:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54065)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SehAs-0002Sm-UT
	for bug-bison@gnu.org; Wed, 13 Jun 2012 02:35:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SehAo-0002G9-E8
	for bug-bison@gnu.org; Wed, 13 Jun 2012 02:35:26 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:55860
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SehAo-0002FH-7v; Wed, 13 Jun 2012 02:35:22 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SehAk-0003g7-HD; Wed, 13 Jun 2012 08:35:18 +0200
Subject: Re: RFC: yacc.c: factor
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FD76D80.1080009@gmail.com>
Date: Wed, 13 Jun 2012 08:35:21 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <14FC07E3-8CAF-4498-8C41-A07AA9D540B3@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<4FD76D80.1080009@gmail.com>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bison Bugs <bug-bison@gnu.org>,
	Bruce Korb <bkorb@gnu.org>, Bison Patches <bison-patches@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2012 06:35:28 -0000


Le 12 juin 2012 =E0 18:25, Stefano Lattarini a =E9crit :

> Hi Akim.

Hi Stefano!

>> Keep only the later.
>>=20
> ... spot this typos: s/later/latter/.

Kinda funny that you are the one to to report a s/lat(.r)/latt\1/ error =
:)
Thanks, fixed!



From MAILER-DAEMON Wed Jun 13 03:03:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SehcL-0008TN-MK
	for mharc-bug-bison@gnu.org; Wed, 13 Jun 2012 03:03:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44149)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SehcF-0008T6-UY
	for bug-bison@gnu.org; Wed, 13 Jun 2012 03:03:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sehc9-0000RX-Kl
	for bug-bison@gnu.org; Wed, 13 Jun 2012 03:03:43 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:57018
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sehc9-0000RA-CG; Wed, 13 Jun 2012 03:03:37 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sehc7-0004qb-2b; Wed, 13 Jun 2012 09:03:35 +0200
Subject: Re: yacc.c does not prototype yyparse in the header
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FD77125.2070807@cs.ucla.edu>
Date: Wed, 13 Jun 2012 09:03:38 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <AE9C526A-D5C4-4AAB-80F2-7D12BF1A4C86@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<4FD5BA89.0@cs.ucla.edu>
	<59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
	<4FD77125.2070807@cs.ucla.edu>
To: Paul Eggert <eggert@cs.ucla.edu>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2012 07:03:48 -0000


Le 12 juin 2012 =E0 18:41, Paul Eggert a =E9crit :

>> Second, I never really paid attention to this before,
>> but how on earth can it be really useful to rename the
>> global variables (--name-prefix) such as yylval, global
>> functions, such as yyparse, but not the global types, such as
>> YYSTYPE?
>=20
> This "works" because different modules can include different
> parser.h files.  So long as no single module includes both
> parser.h files, there is no clash at compile-time; and there
> is no clash at link-time because types are invisible to the
> linker.

Yes, that's what I had written below :)

> But it clearly would be better to do as you suggest
> and to apply the prefix to the types as well -- that
> would support programs where a single module wants to include
> two parser.h files (something that does not work now).

I'm afraid that changing this now would break existing
code.  People might be using YYSTYPE currently to define
their own yylex for instance.  The best course is probably
to define both YYSTYPE and <PREFIX>STYPE for a while.

Instead of

> #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
> typedef union YYSTYPE
> {
>  int ival;
> } YYSTYPE;
> # define YYSTYPE_IS_TRIVIAL 1
> # define yystype YYSTYPE /* obsolescent; will be withdrawn */
> # define YYSTYPE_IS_DECLARED 1
> #endif
>=20
> extern YYSTYPE foolval;

we could issue something as follows.  First, the very same
declaration, but for %name-prefix "foo":

> #if ! defined FOOSTYPE && ! defined FOOSTYPE_IS_DECLARED
> typedef union FOOSTYPE
> {
>  int ival;
> } FOOSTYPE;
> # define FOOSTYPE_IS_TRIVIAL 1
> # define FOOSTYPE_IS_DECLARED 1
> #endif
>=20
> extern FOOSTYPE foolval;

then a compatibility section (with all the needed provisions for
__attribute__):

> # if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
> /* YYSTYPE will be removed in a future release of Bison, use FOOSTYPE. =
*/
> typedef FOOSTYPE YYSTYPE __attribute__ ((deprecated));
> #  if defined FOOSTYPE_IS_TRIVIAL && FOOSTYPE_IS_TRIVIAL
> #   define YYSTYPE_IS_TRIVIAL 1
> #  endif
> #  define YYSTYPE_IS_DECLARED 1
> # endif

There is one problem though.  Unless you rely on %union to define
the types, the documentation promotes "#define YYSTYPE" as a means
to define the semantic type.

Another, completely different, course of action would be
to deprecate %name-prefix and leave it as is, and promote
something like

  %define api.prefix "foo"

which, this time, would also cover the types.  I like this
option, as it is easier to see whether you use the modern
style or the older one, and it is more consistent with our
use of %define today.



From MAILER-DAEMON Wed Jun 13 12:49:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Seqku-0004sB-73
	for mharc-bug-bison@gnu.org; Wed, 13 Jun 2012 12:49:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58962)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Seqkp-0004ro-7Y
	for bug-bison@gnu.org; Wed, 13 Jun 2012 12:49:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Seqkn-0007c6-Kw
	for bug-bison@gnu.org; Wed, 13 Jun 2012 12:49:10 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:57298)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1Seqkf-0007Yv-7P; Wed, 13 Jun 2012 12:49:01 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 81598A6000A;
	Wed, 13 Jun 2012 09:48:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id kRUDVGgq1Ioz; Wed, 13 Jun 2012 09:48:58 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 39015A60007;
	Wed, 13 Jun 2012 09:48:58 -0700 (PDT)
Message-ID: <4FD8C479.6030703@cs.ucla.edu>
Date: Wed, 13 Jun 2012 09:48:57 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: yacc.c does not prototype yyparse in the header
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<4FD5BA89.0@cs.ucla.edu>
	<59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
	<4FD77125.2070807@cs.ucla.edu>
	<AE9C526A-D5C4-4AAB-80F2-7D12BF1A4C86@lrde.epita.fr>
In-Reply-To: <AE9C526A-D5C4-4AAB-80F2-7D12BF1A4C86@lrde.epita.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2012 16:49:15 -0000

On 06/13/2012 12:03 AM, Akim Demaille wrote:
> Another, completely different, course of action would be
> to deprecate %name-prefix and leave it as is, and promote
> something like
> 
>   %define api.prefix "foo"
> 
> which, this time, would also cover the types.

Yes, thanks, this sounds better to me too.


From MAILER-DAEMON Wed Jun 13 15:37:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SetNO-0006vn-4f
	for mharc-bug-bison@gnu.org; Wed, 13 Jun 2012 15:37:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46340)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1SetNL-0006ub-8i
	for bug-bison@gnu.org; Wed, 13 Jun 2012 15:37:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1SetNJ-0002Y5-Ey
	for bug-bison@gnu.org; Wed, 13 Jun 2012 15:37:06 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:37733)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1SetNJ-0002WA-6E
	for bug-bison@gnu.org; Wed, 13 Jun 2012 15:37:05 -0400
Received: by wefh52 with SMTP id h52so1001082wef.0
	for <bug-bison@gnu.org>; Wed, 13 Jun 2012 12:37:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=1QTddzT4gXk0sO4jUJut/evgSytzFHtwaolUaFwTfRc=;
	b=sHo2DV55Eykqu6wktBZtiZEUhbUSWBpy7BKsQKX4KyDm4Gxdhl2eda4X7O9PG+8SNB
	+K3F3BSBhl8fpP9nfmNZ/Y546IpfyIAf7Do8tX/x+4MTGvujoxF/wksQyFaKLIGQwiF/
	09R4X6nDXSMVgU3uTyWoji+Byk8DpgJm/Hx5dIti5PP8HsvwKVuTPwUmcVZA8xBciUys
	0YJ3s5vZyaz19pDprn+qE5ZzhDi/a91bF1VBsX7GwO7sniTkBZeaA3H8g35W2QSsoLMb
	BfWI9+4vuQ7DfkOVD+4wmbF8BSNjXRzmdWNu+SJn2XaVeKkCx5A2R0Emf8vAsDpimrvf
	xoXg==
Received: by 10.180.97.66 with SMTP id dy2mr40171743wib.0.1339616222985;
	Wed, 13 Jun 2012 12:37:02 -0700 (PDT)
Received: from [192.168.0.10] (mna75-4-82-225-76-247.fbx.proxad.net.
	[82.225.76.247])
	by mx.google.com with ESMTPS id e20sm13727109wiv.7.2012.06.13.12.37.01
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 13 Jun 2012 12:37:02 -0700 (PDT)
Subject: Re: [PATCH] Fix 2 typo
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <3EB5E048-9612-4A36-AC01-863979D0C3AA@lrde.epita.fr>
Date: Wed, 13 Jun 2012 21:13:14 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <55656183-B4EB-4733-AC94-AADA64AB46F0@lrde.epita.fr>
References: <1339051460-668-1-git-send-email-g.esp@free.fr>
	<3EB5E048-9612-4A36-AC01-863979D0C3AA@lrde.epita.fr>
To: Gilles Espinasse <g.esp@free.fr>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: bug-bison@gnu.org
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2012 19:37:08 -0000


Le 12 juin 2012 =E0 15:40, Akim Demaille a =E9crit :

>=20
> Le 7 juin 2012 =E0 08:44, Gilles Espinasse a =E9crit :
>=20
>> s/prodecure/procedure/		while reading
>> s/contruction/construction/ 	found by git ls-files | misspellings -f
>=20
> I installed the following in maint (contruction
> is in master only, it needs to be done in another fix).

I installed this in master, thanks!

=46rom 5237cd1ac89d80855770947c42f8957f52047744 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Wed, 13 Jun 2012 21:12:15 +0200
Subject: [PATCH] lalr1.cc: spello.

* data/lalr1.cc: Reported by Gilles Espinasse.
---
 data/lalr1.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/lalr1.cc b/data/lalr1.cc
index 92f93c2..b8334e8 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -850,7 +850,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
       // Destroy a variant which value may have been swapped with
       // yylhs.value (for instance if the action was "std::swap($$,
       // $1)").  The value of yylhs.value (hence possibly one of these
-      // rhs symbols) depends on the default contruction for this
+      // rhs symbols) depends on the default construction for this
       // type.  In the case of pointers for instance, no
       // initialization is done, so the value is junk.  Therefore do
       // not try to report the value of symbols about to be destroyed
--=20
1.7.10.4



From MAILER-DAEMON Wed Jun 13 17:09:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeuoR-00031Y-EK
	for mharc-bug-bison@gnu.org; Wed, 13 Jun 2012 17:09:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42466)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1SeuoO-00030T-Cn
	for bug-bison@gnu.org; Wed, 13 Jun 2012 17:09:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1SeuoL-0002Ep-Mo
	for bug-bison@gnu.org; Wed, 13 Jun 2012 17:09:07 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:56234)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>)
	id 1SeuoL-0002El-Av; Wed, 13 Jun 2012 17:09:05 -0400
Received: by wgbds1 with SMTP id ds1so739973wgb.30
	for <multiple recipients>; Wed, 13 Jun 2012 14:09:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=/2l6BdVt8P3XaoQEMgHzAygKy4xp8dSxa699p5KaQL4=;
	b=A/ml1ElavsfIYEDMKmPFfX5MPs7AVZNIKqO9wCRNamUduuNYgHvWATT2isnxq3c/X0
	lOy2v5TC20O7smiN7mGN4nd+jRoEBTs4nQepS/CwdQGEQzVpXRx0asE6ztl8YvU+FtXj
	RGMe6kHMkLdLgHgZouH+twnGjeOn+IpWw/k4s5isCNzXiTMi03tfYmHmkC9+3KmFamtL
	bpOFUWyT89B7J/Dt7Yee7BrW+QgRAX4M67LyAtxTTgnnuQ0CN0/gxkyrtkK3gdXRPchV
	93aIrJ6poiy2qNeSx3XvaBujLGFVj4w85SWexILh78wggQ/3NUYIAl+/Ya1BU23NJt4n
	XssQ==
Received: by 10.180.94.4 with SMTP id cy4mr40764366wib.2.1339621741759;
	Wed, 13 Jun 2012 14:09:01 -0700 (PDT)
Received: from [192.168.0.10] (mna75-4-82-225-76-247.fbx.proxad.net.
	[82.225.76.247])
	by mx.google.com with ESMTPS id hv7sm12845057wib.0.2012.06.13.14.08.59
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 13 Jun 2012 14:09:00 -0700 (PDT)
Subject: Re: RFC: yacc.c: factor (was: yacc.c does not prototype yyparse in
	the header)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=windows-1252
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
Date: Wed, 13 Jun 2012 23:08:58 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <7E99A4C1-240B-4824-9975-09CE49BD7FB8@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>,
	Jim Meyering <jim@meyering.net>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2012 21:09:10 -0000


Le 12 juin 2012 =E0 18:24, Akim Demaille a =E9crit :

> Fourth step.  This introduces a weakness in Bison: when
> given arguments such as
>=20
> 	--output=3Dsub1/foo.c --defines=3Dsub2/foo.h
>=20
> then sub1/foo.c features '#include "sub2/foo.h"'.  But we actually
> already have this problem in glr.c which already prefers to include
> the header instead of duplicating its content.
>=20
> So we really need to be able to compute "relative" paths here, to
> be addressed in the near future.
>=20
> Ok to install?

I have given a try to computing relative paths by stealing some
bits from the coreutils (relpath.[ch] and a function from ln.c,
as suggested by Eric Blake).  I have pushed in gnulib an akim/relpath
branch with this.

Then I used it in Bison, see below, but I am frighten by the sheer
number of dependencies that this simple idea incurs.  Am I missing
something?  Just have a look at the gitignore changes=85
(this is in the declare-yyparse branch of Bison).

Any opinion is *most* welcome.

=46rom 424cb4f460a0f4f1f8325a8eb7e1d0686635962b Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Wed, 13 Jun 2012 22:22:38 +0200
Subject: [PATCH] compute relative paths from parser.c to parser.h for
 #include

* bootstrap.conf: Request relpath.
* gnulib: Update to get it.
* src/scan-skel.l (@relative): New.
* data/glr.c: Use it.
---
 bootstrap.conf  |    2 ++
 data/glr.c      |    2 +-
 gnulib          |    2 +-
 lib/.gitignore  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 m4/.gitignore   |   25 +++++++++++++++++++++++++
 src/scan-skel.l |   14 ++++++++++++++
 6 files changed, 90 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index aa05e34..1b68ef5 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -28,6 +28,7 @@ gnulib_modules=3D'
   quote quotearg
   readme-release
   realloc-posix
+  relpath
   spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
   unistd unistd-safer unlocked-io update-copyright unsetenv verify
   warnings
@@ -42,6 +43,7 @@ XGETTEXT_OPTIONS=3D$XGETTEXT_OPTIONS'\\\
  --from-code=3DUTF-8\\\
  --flag=3Dasprintf:2:c-format\\\
  --flag=3Dcomplain:1:c-format --flag=3Dcomplain_at:2:c-format\\\
+ --flag=3Derror:3:c-format --flag=3Derror_at_line:5:c-format\\\
  --flag=3Dfatal:1:c-format --flag=3Dfatal_at:2:c-format\\\
  --flag=3Dwarn:1:c-format  --flag=3Dwarn_at:2:c-format\\\
  --flag=3Dunexpected_end:2:c-format\\\
diff --git a/data/glr.c b/data/glr.c
index 7ebc65c..117ccaa 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -202,7 +202,7 @@ m4_if(b4_prefix, [yy], [],
=20
 ]b4_null_define[
=20
-]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
+]b4_defines_if([[#include "@relative(]b4_spec_defines_file[@, =
]b4_parser_file_name[@)"]],
               [b4_shared_declarations])[
=20
 /* Enabling traces.  */
diff --git a/gnulib b/gnulib
index b42157d..2005fbf 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit b42157dd01e3243646f5a8270c09ee125a8aca21
+Subproject commit 2005fbf739536a0f60bf970c24c1ecf3c9cc8a43
diff --git a/lib/.gitignore b/lib/.gitignore
index 5eec743..bb516bd 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -268,3 +268,50 @@
 /xmemdup0.c
 /xmemdup0.h
 /sys_types.in.h
+/relpath.c
+/relpath.h
+/areadlink-with-size.c
+/areadlink.h
+/at-func.c
+/canonicalize.c
+/canonicalize.h
+/chdir-long.c
+/chdir-long.h
+/closedir.c
+/dirent-private.h
+/dirent.in.h
+/dirfd.c
+/dup.c
+/fchdir.c
+/fdopendir.c
+/file-set.c
+/file-set.h
+/filename.h
+/filenamecat-lgpl.c
+/filenamecat.h
+/fstatat.c
+/getcwd-lgpl.c
+/getcwd.c
+/hash-pjw.c
+/hash-pjw.h
+/hash-triple.c
+/hash-triple.h
+/lstat.c
+/mempcpy.c
+/memrchr.c
+/openat-die.c
+/openat-priv.h
+/openat-proc.c
+/openat.c
+/openat.h
+/opendir.c
+/readdir.c
+/readlink.c
+/rewinddir.c
+/same-inode.h
+/same.c
+/same.h
+/save-cwd.c
+/save-cwd.h
+/xgetcwd.c
+/xgetcwd.h
diff --git a/m4/.gitignore b/m4/.gitignore
index d47aee0..d505bf8 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -178,3 +178,28 @@
 /xstrndup.m4
 /off_t.m4
 /sys_types_h.m4
+/canonicalize.m4
+/chdir-long.m4
+/closedir.m4
+/d-ino.m4
+/dirent_h.m4
+/dirfd.m4
+/dup.m4
+/fchdir.m4
+/fdopendir.m4
+/filenamecat.m4
+/fstatat.m4
+/getcwd-abort-bug.m4
+/getcwd-path-max.m4
+/getcwd.m4
+/lstat.m4
+/mempcpy.m4
+/memrchr.m4
+/openat.m4
+/opendir.m4
+/readdir.m4
+/readlink.m4
+/rewinddir.m4
+/same.m4
+/save-cwd.m4
+/xgetcwd.m4
diff --git a/src/scan-skel.l b/src/scan-skel.l
index 2433905..7e7f68e 100644
--- a/src/scan-skel.l
+++ b/src/scan-skel.l
@@ -36,6 +36,7 @@
 #include "complain.h"
 #include "getargs.h"
 #include "files.h"
+#include "relpath.h"
 #include "scan-skel.h"
=20
 #define YY_DECL static int skel_lex (void)
@@ -265,6 +266,19 @@ at_directive_perform (int at_directive_argc,
             break;
         }
     }
+  else if (0 =3D=3D strcmp (at_directive_argv[0], "@relative"))
+    {
+      if (at_directive_argc < 3)
+        fail_for_at_directive_too_few_args (at_directive_argv[0]);
+      if (at_directive_argc > 3)
+        fail_for_at_directive_too_many_args (at_directive_argv[0]);
+      {
+	char *rel =3D convert_abs_rel(at_directive_argv[1],
+				    at_directive_argv[2]);
+	fputs (rel, yyout);
+	free (rel);
+      }
+    }
   else if (0 =3D=3D strcmp (at_directive_argv[0], "@output"))
     {
       if (at_directive_argc > 2)
--=20
1.7.10.4




From MAILER-DAEMON Wed Jun 13 17:26:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sev5Q-0005Y8-K6
	for mharc-bug-bison@gnu.org; Wed, 13 Jun 2012 17:26:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42942)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <scoopy.puppy@gmail.com>) id 1Setei-0003Tn-At
	for bug-bison@gnu.org; Wed, 13 Jun 2012 15:55:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <scoopy.puppy@gmail.com>) id 1Seteg-0006OX-MK
	for bug-bison@gnu.org; Wed, 13 Jun 2012 15:55:03 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:42778)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <scoopy.puppy@gmail.com>)
	id 1Seteg-0006HG-D1; Wed, 13 Jun 2012 15:55:02 -0400
Received: by wgbds1 with SMTP id ds1so5503047wgb.0
	for <multiple recipients>; Wed, 13 Jun 2012 12:54:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=HKhAohSLTNFFcgeJM3oHzyzMw15TQYgQUQlmqo/PMe0=;
	b=v+FM7e/I0Yg0Mn+OCTSbxN5dsccOkf1ce+oIZP4wQNpsD50//+4moYU0bIzjzc6ycX
	usUh8fWE7lJ51FGSXiBjv+33cxQPn4mp83gtcBtB9OnBGepoX1gFsQeUwnh4WsCU5WxF
	2Kz939itXC/OcuG6exEhYmhiUzf+BMpsRiZo8iw6+G29wgRvVj/7X1y5zMqBIV2lF4G7
	SljYZIQ9uVxiHvMw/5L2iLjAKwn2x1AwBQPxQ2LGtPJhNi4yuOYyBLrZt6uTGYzJCY+Y
	vm9GznmpQ0NB6ikJLxi5KjoNQp5fh27+3IIm/LE0KBNz8uAW/5BF62bwb42+sU1UTlKR
	yH5w==
Received: by 10.180.106.137 with SMTP id gu9mr40700127wib.8.1339617298260;
	Wed, 13 Jun 2012 12:54:58 -0700 (PDT)
Received: from [192.168.0.10] (mna75-4-82-225-76-247.fbx.proxad.net.
	[82.225.76.247])
	by mx.google.com with ESMTPS id fo7sm13822206wib.9.2012.06.13.12.54.56
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 13 Jun 2012 12:54:57 -0700 (PDT)
Subject: Re: RFC: yacc.c: factor (was: yacc.c does not prototype yyparse in
	the header)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <scoopy.puppy@gmail.com>
In-Reply-To: <CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
Date: Wed, 13 Jun 2012 21:54:55 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <0F213E49-DB55-42B8-A406-AA3ECDF7823A@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
X-Mailman-Approved-At: Wed, 13 Jun 2012 17:26:43 -0400
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2012 19:55:05 -0000


Le 12 juin 2012 =E0 16:07, Akim Demaille a =E9crit :

>=20
> Le 11 juin 2012 =E0 10:54, Akim Demaille a =E9crit :
>=20
>> Bruce Korb just pointed out to me that Bison 2.5.1 does
>> not prototype yyparse in the generated header, with yacc.c.
>> The other skeletons do.  I don't understand why.  I see
>> nothing in the documentation of Yacc that prevents this,
>> and surely this is troublesome for many uses.
>=20
> Third act of refactoring.  This time it is not installed
> yet, as I would appreciate some opinion, as the generated
> code is somewhat different:
>=20
>  The main difference is that in the *.c file we used the yy*
>  names (as %prefix is handled by "#define yy* <prefix>*" before), =
while
>  the *.hh used <prefix>* names.  Keep only the later.
>=20
> I don't think we care, but someone might have a different
> opinion.

Installed in maint.



From MAILER-DAEMON Fri Jun 15 07:34:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SfUnI-0004RN-Iv
	for mharc-bug-bison@gnu.org; Fri, 15 Jun 2012 07:34:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33405)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SfUnF-0004QI-EN
	for bug-bison@gnu.org; Fri, 15 Jun 2012 07:34:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SfUnC-0000sW-Vs
	for bug-bison@gnu.org; Fri, 15 Jun 2012 07:34:20 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:47793
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SfUnC-0000sC-Nq; Fri, 15 Jun 2012 07:34:18 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SfUn9-0004NH-RS; Fri, 15 Jun 2012 13:34:15 +0200
Subject: Re: yacc.c: instead of duplicating y.tab.h inside y.tac.c,
	include it (was: RFC: yacc.c: factor)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
Date: Fri, 15 Jun 2012 13:34:21 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <779B1E9A-9167-4C3B-BB2B-3A767DFEE80F@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>,
 Bison Patches <bison-patches@gnu.org>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Jun 2012 11:34:23 -0000


Le 12 juin 2012 =E0 18:24, Akim Demaille a =E9crit :

> Le 12 juin 2012 =E0 16:07, Akim Demaille a =E9crit :
>=20
>> Third act of refactoring.  This time it is not installed
>> yet, as I would appreciate some opinion, as the generated
>> code is somewhat different:
>=20
> Fourth step.  This introduces a weakness in Bison: when
> given arguments such as
>=20
> 	--output=3Dsub1/foo.c --defines=3Dsub2/foo.h
>=20
> then sub1/foo.c features '#include "sub2/foo.h"'.  But we actually
> already have this problem in glr.c which already prefers to include
> the header instead of duplicating its content.
>=20
> So we really need to be able to compute "relative" paths here, to
> be addressed in the near future.
>=20
> Ok to install?

I installed it, and some more tests, in maint, as follows.

=46rom 0f11eec272453d5646e5aeda135650b4fb8ac33d Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 12 Jun 2012 16:15:14 +0200
Subject: [PATCH 1/2] yacc.c: instead of duplicating y.tab.h inside =
y.tac.c,
 include it.

This is already what glr.c and lalr1.cc do.

* data/yacc.c: here.
---
 NEWS        |   14 ++++++++++++++
 data/glr.c  |    2 +-
 data/yacc.c |    3 ++-
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 393538c..fd51b61 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,20 @@ GNU Bison NEWS
=20
 * Noteworthy changes in release ?.? (????-??-??) [?]
=20
+** Future changes:
+
+  The next major release will drop support for generating parsers in =
K&R C,
+  and remove the definition of yystype (removal announced since Bison
+  1.875).
+
+** Changes in regular C parsers (yacc.c):
+
+*** The generated header is included
+
+  Instead of duplicating the content of the generated header =
(definition of
+  YYSTYPE, yyltype etc.), the generated parser now includes it, as was
+  already the case for GLR or C++ parsers.
+
 * Noteworthy changes in release 2.5.1 (2012-06-05) [stable]
=20
 ** Future changes:
diff --git a/data/glr.c b/data/glr.c
index 7ebc65c..223aa1e 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -203,7 +203,7 @@ m4_if(b4_prefix, [yy], [],
 ]b4_null_define[
=20
 ]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
-              [b4_shared_declarations])[
+               [b4_shared_declarations])[
=20
 /* Enabling traces.  */
 #ifndef YYDEBUG
diff --git a/data/yacc.c b/data/yacc.c
index 079e488..d5000da 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -319,7 +319,8 @@ m4_if(b4_prefix, [yy], [],
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
=20
-]b4_shared_declarations[
+]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
+               [b4_shared_declarations])[
=20
 /* Copy the second part of user declarations.  */
 ]b4_user_post_prologue
--=20
1.7.10.4



=46rom 9d67a52ad6f9aa1241d64b9766525362715b16e8 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Tue, 12 Jun 2012 18:14:49 +0200
Subject: [PATCH 2/2] tests: strengthen the test on generated headers
 inclusion

* tests/headers.at (AT_TEST_CPP_GUARD_H): Accept Bison directives.
(Invalid CPP headers): Check glr.
---
 tests/headers.at |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tests/headers.at b/tests/headers.at
index 9d4946d..9710e0c 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -46,17 +46,19 @@ AT_CLEANUP
 ## Invalid CPP headers.  ##
 ## --------------------- ##
=20
-# AT_TEST_CPP_GUARD_H([INPUT-FILE-BASE)
-# -------------------------------------
+# AT_TEST_CPP_GUARD_H(BASE-NAME, [DIRECTIVES])
+# --------------------------------------------
+# FIXME: Much of this can be covered by calc.at.
 m4_define([AT_TEST_CPP_GUARD_H],
-[AT_SETUP([Invalid CPP guards: $1])
+[AT_SETUP([Invalid CPP guards: $2 --defines=3D$1.h])
=20
 # Possibly create inner directories.
 dirname=3D`AS_DIRNAME([$1])`
 AS_MKDIR_P([$dirname])
=20
 AT_DATA_GRAMMAR([$1.y],
-[%{
+[$2
+%{
 #include <$1.h>
 void yyerror (const char *);
 int yylex (void);
@@ -67,15 +69,17 @@ dummy:;
 #include <$1.h>
 ])
=20
-AT_BISON_CHECK([--defines=3D$1.h --output=3Dy.tab.c $1.y])
+AT_BISON_CHECK([--defines=3D$1.h --output=3D$1.c $1.y])
=20
-AT_COMPILE([y.tab.o], [-I. -c y.tab.c])
+AT_COMPILE([$1.o], [-I. -c $1.c])
=20
 AT_CLEANUP
 ])
=20
 AT_TEST_CPP_GUARD_H([input/input])
 AT_TEST_CPP_GUARD_H([9foo])
+AT_TEST_CPP_GUARD_H([input/input], [%glr-parser])
+AT_TEST_CPP_GUARD_H([9foo],        [%glr-parser])
=20
=20
=20
--=20
1.7.10.4




From MAILER-DAEMON Wed Jun 20 01:27:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ShDRU-0000Jm-0t
	for mharc-bug-bison@gnu.org; Wed, 20 Jun 2012 01:27:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47753)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1ShDRQ-0000IB-W6
	for bug-bison@gnu.org; Wed, 20 Jun 2012 01:26:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1ShDRP-0005jx-5d
	for bug-bison@gnu.org; Wed, 20 Jun 2012 01:26:56 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:36412)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>)
	id 1ShDRO-0005jV-Sq; Wed, 20 Jun 2012 01:26:55 -0400
Received: by wgbds1 with SMTP id ds1so3027662wgb.0
	for <multiple recipients>; Tue, 19 Jun 2012 22:26:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=VLFE38DCGy7fb86Y5GXRo/9gQq8LlUnD6+cB8acidYw=;
	b=CWQk0JAPq/mcZe2vIW3TLIPZXVOt4adikLlCMPpyaJCyDDwJphrcWpnTx3wdZMIMiq
	mRwOLhbJvFOn6gckMOHkNGQlBIW0MZazhYzfAsSWZXHbpoXmXF7x0xwOdGCbvqmhJ058
	kmTqkGV5VxPq+HNYv+QXDS0f93Rfh1s5JL3kyVQPpnHwMvCzZXs0xfpn3eeAm4KeWD2+
	tWp2FS1J/l+SGnuyg1Ex+aB/OA+YOAsyyo61aSPXjNKgImEwT+awXWo3WNDAexjP+fhu
	CrcmxdA+jMghYbd+20XVhQt1i5OJfxZKmNCEunOzPBFSgvnLurgSpeMlLOw8ssP86uhv
	gjFg==
Received: by 10.216.208.80 with SMTP id p58mr11149941weo.139.1340170011357;
	Tue, 19 Jun 2012 22:26:51 -0700 (PDT)
Received: from [192.168.0.10] (mna75-4-82-225-76-247.fbx.proxad.net.
	[82.225.76.247])
	by mx.google.com with ESMTPS id gb9sm36865646wib.8.2012.06.19.22.26.48
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 19 Jun 2012 22:26:49 -0700 (PDT)
Subject: ylwrap does not rename y.tab.h in y.tab.c (was: yacc.c: instead of
	duplicating y.tab.h inside y.tac.c, include it)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <779B1E9A-9167-4C3B-BB2B-3A767DFEE80F@lrde.epita.fr>
Date: Wed, 20 Jun 2012 07:26:47 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <B0B07281-04CE-451E-933E-2779341A41B6@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
	<779B1E9A-9167-4C3B-BB2B-3A767DFEE80F@lrde.epita.fr>
To: Bison Bugs <bug-bison@gnu.org>, Bison Patches <bison-patches@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jun 2012 05:26:58 -0000


Le 15 juin 2012 =E0 13:34, Akim Demaille a =E9crit :

> I installed it, and some more tests, in maint, as follows.

>=20
> =46rom 0f11eec272453d5646e5aeda135650b4fb8ac33d Mon Sep 17 00:00:00 =
2001
> From: Akim Demaille <akim@lrde.epita.fr>
> Date: Tue, 12 Jun 2012 16:15:14 +0200
> Subject: [PATCH 1/2] yacc.c: instead of duplicating y.tab.h inside =
y.tac.c, include it.

We have a problem with this change (which can be seen if
you make check in master): as far as I can tell, ylwrap,
which goes via y.tab.c and y.tab.h, does _not_ change the
occurrences of y.tab.h in y.tab.c.  So in the end, the
parser implementation file foo.c includes y.tab.h instead of
foo.h.

This is Automake 1.12.1, ylwrap 2011-08-25.18.

Because of this, it is unclear to me whether we can leave that
change, users would face the same issue as bison-master :(
And it does not seem acceptable that Bison 2.6 mandates Automake
1.12.2 or whatever.

Any suggestion?  In particular a workaround (for Makefile.am)
which would work for both older and newer Automakes.



From MAILER-DAEMON Mon Jun 25 04:25:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sj4cF-0000nZ-I3
	for mharc-bug-bison@gnu.org; Mon, 25 Jun 2012 04:25:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52364)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sj4cA-0000nJ-9o
	for bug-bison@gnu.org; Mon, 25 Jun 2012 04:25:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1Sj4c3-0002k8-7v
	for bug-bison@gnu.org; Mon, 25 Jun 2012 04:25:41 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:46677
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sj4c2-0002jw-V7; Mon, 25 Jun 2012 04:25:35 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1Sj4by-0002TE-ES; Mon, 25 Jun 2012 10:25:30 +0200
Subject: Re: ylwrap does not rename y.tab.h in y.tab.c (was: yacc.c: instead
	of duplicating y.tab.h inside y.tac.c, include it)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <B0B07281-04CE-451E-933E-2779341A41B6@lrde.epita.fr>
Date: Mon, 25 Jun 2012 10:25:31 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <58E47CF9-C91C-4121-A10C-46F94049F2B2@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
	<779B1E9A-9167-4C3B-BB2B-3A767DFEE80F@lrde.epita.fr>
	<B0B07281-04CE-451E-933E-2779341A41B6@lrde.epita.fr>
To: Akim Demaille <akim.demaille@gmail.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>,
	Bison Patches <bison-patches@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jun 2012 08:25:46 -0000


Le 20 juin 2012 =E0 07:26, Akim Demaille a =E9crit :

>=20
> Le 15 juin 2012 =E0 13:34, Akim Demaille a =E9crit :
>=20
>> I installed it, and some more tests, in maint, as follows.
>=20
>>=20
>> =46rom 0f11eec272453d5646e5aeda135650b4fb8ac33d Mon Sep 17 00:00:00 =
2001
>> From: Akim Demaille <akim@lrde.epita.fr>
>> Date: Tue, 12 Jun 2012 16:15:14 +0200
>> Subject: [PATCH 1/2] yacc.c: instead of duplicating y.tab.h inside =
y.tac.c, include it.
>=20
> We have a problem with this change (which can be seen if
> you make check in master): as far as I can tell, ylwrap,
> which goes via y.tab.c and y.tab.h, does _not_ change the
> occurrences of y.tab.h in y.tab.c.  So in the end, the
> parser implementation file foo.c includes y.tab.h instead of
> foo.h.
>=20
> This is Automake 1.12.1, ylwrap 2011-08-25.18.
>=20
> Because of this, it is unclear to me whether we can leave that
> change, users would face the same issue as bison-master :(
> And it does not seem acceptable that Bison 2.6 mandates Automake
> 1.12.2 or whatever.
>=20
> Any suggestion?  In particular a workaround (for Makefile.am)
> which would work for both older and newer Automakes.

Well, I guess I must step back.  I installed what follows
in maint.

What are the versions of Automake to fix?  Should 1.11.*
be addressed too?  I have no idea how wide spread 1.12 is.

=46rom 55d1006fcedde7a816290dfcd7cb84fa227ae560 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Mon, 25 Jun 2012 10:15:44 +0200
Subject: [PATCH] yacc: work around the ylwrap limitation.

* data/yacc.c (b4_shared_declarations): Include the header guards.
Do not include the header in the *.c file, duplicate it.
* NEWS (Future Changes): Extend, and announce the forthcoming change
about the use of the parser header.
---
 NEWS        |   32 +++++++++++++++++++++++---------
 data/yacc.c |   15 +++++++++------
 2 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/NEWS b/NEWS
index 72e4b6b..10829f5 100644
--- a/NEWS
+++ b/NEWS
@@ -2,19 +2,33 @@ GNU Bison NEWS
=20
 * Noteworthy changes in release ?.? (????-??-??) [?]
=20
-** Future changes:
+** Future changes
+
+  The next major release of Bison will drop support for the following
+  deprecated features.  Please report disagreements to =
bug-bison@gnu.org.
+
+*** K&C parsers
+
+  Support for generating parsers in K&R C will be removed.  Parsers
+  generated for C supprt ISO C90, and are tested with ISO C99 and ISO =
C11
+  compilers.
+
+*** Deprecated features
+
+  The definitions of yystype and yyltype will be removed, as announced =
since
+  Bison 1.875.  Use YYSTYPE and YYLTYPE only.
=20
-  The next major release will drop support for generating parsers in =
K&R C,
-  and remove the definitions of yystype and yyltype (removal announced =
since
-  Bison 1.875).  YYPARSE_PARAM and YYLEX_PARAM, which were deprecated =
in
-  favor of %parse-param and %lex-param (introduced in Bison 1.875 too), =
will
-  no longer be supported.
+  YYPARSE_PARAM and YYLEX_PARAM, which were deprecated in favor of
+  %parse-param and %lex-param (introduced in Bison 1.875), will no =
longer be
+  supported.
=20
-** The generated header is included (yacc.c)
+*** The generated header will be included (yacc.c)
=20
   Instead of duplicating the content of the generated header =
(definition of
-  YYSTYPE, yyltype etc.), the generated parser now includes it, as was
-  already the case for GLR or C++ parsers.
+  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.
=20
 ** Headers (yacc.c, glr.c, glr.cc)
=20
diff --git a/data/yacc.c b/data/yacc.c
index 400c68c..57f3dac 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -227,6 +227,8 @@ m4_define([b4_declare_parser_state_variables], =
[b4_pure_if([[
=20
 # b4_declare_yyparse_push_
 # ------------------------
+# Declaration of yyparse (and dependencies) when using the push parser
+# (including in pull mode).
 m4_define([b4_declare_yyparse_push_],
 [[typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
 enum { YYPUSH_MORE =3D 4 };
@@ -272,12 +274,14 @@ m4_define([b4_declare_yyparse],
 # Declaration that might either go into the header (if --defines)
 # or open coded in the parser body.
 m4_define([b4_shared_declarations],
-[b4_declare_yydebug[
+[b4_cpp_guard_open([b4_spec_defines_file])[
+]b4_declare_yydebug[
 ]b4_percent_code_get([[requires]])[
 ]b4_token_enums_defines(b4_tokens)[
 ]b4_declare_yylstype[
 ]b4_declare_yyparse[
-]b4_percent_code_get([[provides]])[]dnl
+]b4_percent_code_get([[provides]])[
+]b4_cpp_guard_close([b4_spec_defines_file])[]dnl
 ])
=20
 ## -------------- ##
@@ -337,8 +341,9 @@ m4_if(b4_prefix, [yy], [],
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
=20
-]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
-               [b4_shared_declarations])[
+/* In a future release of Bison, this section will be replaced
+   by #include "@basename(]b4_spec_defines_file[@)".  */
+]b4_shared_declarations[
=20
 /* Copy the second part of user declarations.  */
 ]b4_user_post_prologue
@@ -2065,8 +2070,6 @@ b4_defines_if(
 b4_copyright([Bison interface for Yacc-like parsers in C],
              [1984, 1989-1990, 2000-2012])[
=20
-]b4_cpp_guard_open([b4_spec_defines_file])[
 ]b4_shared_declarations[
-]b4_cpp_guard_close([b4_spec_defines_file])[
 ]])dnl b4_defines_if
 m4_divert_pop(0)
--=20
1.7.10.4




From MAILER-DAEMON Mon Jun 25 05:30:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sj5d6-00009p-Jm
	for mharc-bug-bison@gnu.org; Mon, 25 Jun 2012 05:30:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44793)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1Sj5cy-00008k-6m
	for bug-bison@gnu.org; Mon, 25 Jun 2012 05:30:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1Sj5cq-0001s6-Qf
	for bug-bison@gnu.org; Mon, 25 Jun 2012 05:30:35 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:42995)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1Sj5cq-0001q0-EZ; Mon, 25 Jun 2012 05:30:28 -0400
Received: by bkcjm19 with SMTP id jm19so3417378bkc.0
	for <multiple recipients>; Mon, 25 Jun 2012 02:30:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=CyPvgfdVmHNNqHbRIgh2pmAOWCXyYHSULFfgDzv4r8Y=;
	b=rzwTR7B2qA8LKN0J3p+WCsh2W92bO6USljEsQ/X95VPgei8fpRdQ5802BcDnAAKws5
	RZnw9oWmRhACUUngPBTYMRww2St61JlLXjYjuYf546uW+hnA0xs+8rwBgzBdLs88CQlo
	DR3c9Y0UDjlNtLHNPu0CKpvHeCUIS3UHfnW99PkUF12KLdHoIeJ5zqigApxR1LGwcav5
	RJqJY/m8rcHpLFWnl0t0n3+/Retkbq9aLLfvzFd4yt+NiwnDoGVcGc9d+pX4xNeyV1FY
	y0HT0IxjkxUEw/FQNq2MNArBSI6IIvCOFj4NZ+nsFzUuLy+MXyJRfxky2/CGenwSTIZt
	slyw==
Received: by 10.204.133.220 with SMTP id g28mr3764518bkt.54.1340616624061;
	Mon, 25 Jun 2012 02:30:24 -0700 (PDT)
Received: from [87.4.96.175]
	(host175-96-dynamic.4-87-r.retail.telecomitalia.it. [87.4.96.175])
	by mx.google.com with ESMTPS id gm18sm45628510bkc.7.2012.06.25.02.30.20
	(version=SSLv3 cipher=OTHER); Mon, 25 Jun 2012 02:30:22 -0700 (PDT)
Message-ID: <4FE82FAA.7050203@gmail.com>
Date: Mon, 25 Jun 2012 11:30:18 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: ylwrap does not rename y.tab.h in y.tab.c
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
	<779B1E9A-9167-4C3B-BB2B-3A767DFEE80F@lrde.epita.fr>
	<B0B07281-04CE-451E-933E-2779341A41B6@lrde.epita.fr>
	<58E47CF9-C91C-4121-A10C-46F94049F2B2@lrde.epita.fr>
In-Reply-To: <58E47CF9-C91C-4121-A10C-46F94049F2B2@lrde.epita.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bison Patches <bison-patches@gnu.org>,
	"automake-patches@gnu.org" <automake-patches@gnu.org>,
	Bison Bugs <bug-bison@gnu.org>, 11419@debbugs.gnu.org,
	Bruce Korb <bkorb@gnu.org>, Akim Demaille <akim.demaille@gmail.com>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jun 2012 09:30:42 -0000

Reference:
<http://lists.gnu.org/archive/html/bug-bison/2012-06/msg00032.html>

On 06/25/2012 10:25 AM, Akim Demaille wrote:
> 
> Le 20 juin 2012 à 07:26, Akim Demaille a écrit :
> 
>>
>> Le 15 juin 2012 à 13:34, Akim Demaille a écrit :
>>
>>> I installed it, and some more tests, in maint, as follows.
>>
>>>
>>> From 0f11eec272453d5646e5aeda135650b4fb8ac33d Mon Sep 17 00:00:00 2001
>>> From: Akim Demaille <akim@lrde.epita.fr>
>>> Date: Tue, 12 Jun 2012 16:15:14 +0200
>>> Subject: [PATCH 1/2] yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
>>
>> We have a problem with this change (which can be seen if
>> you make check in master): as far as I can tell, ylwrap,
>> which goes via y.tab.c and y.tab.h, does _not_ change the
>> occurrences of y.tab.h in y.tab.c.  So in the end, the
>> parser implementation file foo.c includes y.tab.h instead of
>> foo.h.
>>
>> This is Automake 1.12.1, ylwrap 2011-08-25.18.
>>
>> Because of this, it is unclear to me whether we can leave that
>> change, users would face the same issue as bison-master :(
>> And it does not seem acceptable that Bison 2.6 mandates Automake
>> 1.12.2 or whatever.
>>
>> Any suggestion?  In particular a workaround (for Makefile.am)
>> which would work for both older and newer Automakes.
> 
> Well, I guess I must step back.  I installed what follows
> in maint.
>
Sigh, advancement on Bison kept back by the fact that Automake used to
bend over backwards to support inferior yacc implementation that today
hardly anybody is using to build an autoconfiscated package.  It's now
definitely time to implement a 'no-ylwrap' option that prevents the use
of 'ylwrap'.  IMHO this option should go in Automake 1.12.2, become the
default in Automake 1.13, and the only supported mode of operation in
Automake 1.14 (unless real users object).

Patches will follow in the next days.

> What are the versions of Automake to fix?  Should 1.11.*
> be addressed too?
>
I don't think it's worth.  People that will want their generated Makefile.in
working correctly with new Bison will upgrade to Automake 1.12.2.

> I have no idea how wide spread 1.12 is.
>
Well, if it's not much widespread, this new feature will help it become so ;-)

Thanks,
  Stefano


From MAILER-DAEMON Mon Jun 25 10:02:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sj9rz-0002VJ-AG
	for mharc-bug-bison@gnu.org; Mon, 25 Jun 2012 10:02:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47300)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1Sj9rr-0002LT-Di
	for bug-bison@gnu.org; Mon, 25 Jun 2012 10:02:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1Sj9rk-000090-Nh
	for bug-bison@gnu.org; Mon, 25 Jun 2012 10:02:14 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61842)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1Sj9rG-0008Un-9X; Mon, 25 Jun 2012 10:01:38 -0400
Received: by bkcjm19 with SMTP id jm19so3712099bkc.0
	for <multiple recipients>; Mon, 25 Jun 2012 07:01:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
	bh=h18ldZRJjQ+6oCM3BnEx/hHiYWSBSQsbltvat6IWNfU=;
	b=x94awwe8xhhZct4/tSzsBDEiDIEu8LEiboGWV5NcJsk+asCMujNtGBmlPCQ/EOQHLT
	wSw1CruBCwpENFRCkwCSThEg0DPfXSWUIdKC/rc6A9qqvq/ICWjT0IhYmGhHeOsaazo1
	XDBsMpsX6eqae1WpSB5w5dyp3DqjNcE0Z8y8bgs9P7oGvbVvwUim+AfTz6lK0koQN97H
	caoMJgBDfzYfPkvBB89L7h0TIT5Tt2zDdUQxpOEwseSKct+OFwyPyNZ3jr2mAwfdGCGy
	CvulC807GqXyDBEdE+jTLoVzbDJ/rf2Cr7DvLEuSHf9dMVgmJK1hPmjn6RvLwztDQuEb
	oeWQ==
Received: by 10.204.128.149 with SMTP id k21mr3997472bks.42.1340632892557;
	Mon, 25 Jun 2012 07:01:32 -0700 (PDT)
Received: from localhost.localdomain
	(host175-96-dynamic.4-87-r.retail.telecomitalia.it. [87.4.96.175])
	by mx.google.com with ESMTPS id
	fu14sm46692848bkc.13.2012.06.25.07.01.29
	(version=TLSv1/SSLv3 cipher=OTHER);
	Mon, 25 Jun 2012 07:01:31 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: automake-patches@gnu.org
Subject: [PATCH] yacc,
	lex: new 'no-ylwrap' option to prevent use of the 'ylwrap' script
Date: Mon, 25 Jun 2012 16:01:13 +0200
Message-Id: <7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.9.5
In-Reply-To: <4FE82FAA.7050203@gmail.com>
References: <4FE82FAA.7050203@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: paul Eggert <eggert@CS.UCLA.EDU>, Akim Demaille <akim@lrde.epita.fr>,
	bug-bison@gnu.org, bison-patches@gnu.org, 11419@debbugs.gnu.org,
	Bruce Korb <bkorb@gnu.org>, Akime Demaille <akim.demaille@gmail.com>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jun 2012 14:02:21 -0000

When used with good yacc and lex implementations, like Flex and GNU Bison,
the 'ylwarp' script (meant to work around the deficiencies of older or
inferior yacc and lex implementations) creates far more problems and
annoyances than it solves.  For more details, just see the huge amount of
related bug reports and complaints:

  <http://debbugs.gnu.org/11419>
  <http://debbugs.gnu.org/10825>
  <http://debbugs.gnu.org/9933>
  <http://debbugs.gnu.org/7648>
  <http://lists.gnu.org/archive/html/automake/2010-10/msg00073.html>
  <http://lists.gnu.org/archive/html/automake/2009-03/msg00062.html>
  <http://lists.gnu.org/archive/html/automake/2009-03/msg00061.html>

So we now offer an option ('no-ylwrap') to disable the use of ylwrap in
the Automake-generated rules.  We also offer the inverse option 'ylwrap',
to force the use of the 'ylwrap' script; it is a no-op right now, but its
use will allow us to switch the default in Automake 1.13 (i.e., we will
start *not* using ylwrap by default) while still supporting users who
 want to continue using ylwrap.

* lib/Automake/Options.pm (_is_valid_easy_option, _process_option_list):
Recognize the options 'no-ylwrap' and 'ylwrap'.
* automake.in (handle_languages): Pass the new transform '?USE-YLWRAP?'
to the processed $rule_file; this transform expands to false if the
'no-ylwrap' option is used, and to true otherwise.
(yacc_lex_finish_helper): Don't require nor copy the 'ylwrap' script if
the 'no-ylwrap' option is active.
* lib/am/lex.am, lib/am/yacc.am: Simplify rules not to use the 'ylwrap'
script if the '?USE-YLWRAP?' transform is true.  Related refactorings.
* t/lex-multiple.sh: New test, checks that if we get ylwrap out of the
way, we can build a program using several lexers at once.
* t/list-of-tests.mk (handwritten_TESTS): Add it.
* t/yacc-bison-skeleton.sh: Use the 'no-ylwrap' option.  This allow the
test to pass, at last!
* t/yacc-bison-skeleton-cxx.sh: Likewise.
* t/list-of-tests.mk (XFAIL_TESTS): Remove those two tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---

 Here's the first step in our revamping of yacc/lex rules.  It's quite
 rough and  has probably suboptimal semantics, but it will offer a simple
 and quick way out for all those users which were fighting against ylwrap.
 So, OK for maint?  I will follow up with a documentation patch (and a
 NEWS update) if this change is accepted.

 Regards,
   Stefano

 automake.in                  |    6 ++-
 lib/Automake/Options.pm      |    6 +++
 lib/am/lex.am                |   14 ++++--
 lib/am/yacc.am               |   14 ++++--
 t/lex-multiple.sh            |  106 ++++++++++++++++++++++++++++++++++++++++++
 t/list-of-tests.mk           |    3 +-
 t/yacc-bison-skeleton-cxx.sh |    5 +-
 t/yacc-bison-skeleton.sh     |    1 +
 8 files changed, 143 insertions(+), 12 deletions(-)
 create mode 100755 t/lex-multiple.sh

diff --git a/automake.in b/automake.in
index cfc48bf..939c303 100644
--- a/automake.in
+++ b/automake.in
@@ -1472,7 +1472,9 @@ sub handle_languages
 			     COMPILE   => '$(' . $lang->compiler . ')',
 			     LTCOMPILE => '$(LT' . $lang->compiler . ')',
 			     -o        => $output_flag,
-			     SUBDIROBJ => !! option 'subdir-objects');
+			     SUBDIROBJ => !! option 'subdir-objects',
+                             'USE-YLWRAP' => ! option 'no-ylwrap',
+                             );
 	}
 
 	# Now include code for each specially handled object with this
@@ -1549,6 +1551,7 @@ sub handle_languages
 			     COMPILE   => $obj_compile,
 			     LTCOMPILE => $obj_ltcompile,
 			     -o        => $output_flag,
+                             'USE-YLWRAP' => ! option 'no-ylwrap',
 			     %file_transform);
 	}
 
@@ -6084,6 +6087,7 @@ sub lang_lex_target_hook
 # This is a helper for both lex and yacc.
 sub yacc_lex_finish_helper
 {
+  return if option 'no-ylwrap';
   return if defined $language_scratch{'lex-yacc-done'};
   $language_scratch{'lex-yacc-done'} = 1;
 
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 2f977bd..920a62f 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -285,6 +285,7 @@ sub _is_valid_easy_option ($)
     no-installinfo
     no-installman
     no-texinfo.tex
+    no-ylwrap
     nostdinc
     readme-alpha
     std-options
@@ -333,6 +334,11 @@ sub _process_option_list (\%@)
           # This is a little of an hack, but good enough for the moment.
           delete $options->{'parallel-tests'};
         }
+      elsif ($_ eq 'ylwrap')
+        {
+          # This is a little of an hack, but good enough for the moment.
+          delete $options->{'no-ylwrap'};
+        }
       elsif (/^filename-length-max=(\d+)$/)
         {
           delete $options->{$_};
diff --git a/lib/am/lex.am b/lib/am/lex.am
index 7467f4f..19555b0 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -23,8 +23,14 @@ endif %?MAINTAINER-MODE%
 
 ?GENERIC?%EXT%%DERIVED-EXT%:
 ?!GENERIC?%OBJ%: %SOURCE%
-?GENERIC?	%VERBOSE%$(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
-?!GENERIC?	%VERBOSE% \
-?!GENERIC??DIST_SOURCE?	$(am__skiplex) \
+if %?GENERIC%
+	%VERBOSE%$(am__skiplex) \
+?USE-YLWRAP?	$(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
+?!USE-YLWRAP?	%COMPILE% -o $@ %SOURCE%
+else !%?GENERIC%
+	%VERBOSE% \
+?DIST_SOURCE?	$(am__skiplex) \
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?	$(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
+?USE-YLWRAP?	$(SHELL) $(YLWRAP)  `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
+?!USE-YLWRAP?	%COMPILE% -o $@  `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+endif  !%?GENERIC%
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index e74259f..77af963 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -43,8 +43,14 @@ endif %?FIRST%
 
 ?GENERIC?%EXT%%DERIVED-EXT%:
 ?!GENERIC?%OBJ%: %SOURCE%
-?GENERIC?	%VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
-?!GENERIC?	%VERBOSE% \
-?!GENERIC??DIST_SOURCE?	$(am__skipyacc) \
+if %?GENERIC%
+	%VERBOSE%$(am__skipyacc) \
+?USE-YLWRAP?	$(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
+?!USE-YLWRAP?	%COMPILE% -o $@ %SOURCE%
+else !%?GENERIC%
+	%VERBOSE% \
+?DIST_SOURCE?	$(am__skipyacc) \
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?	$(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
+?USE-YLWRAP?	$(SHELL) $(YLWRAP)  `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
+?!USE-YLWRAP?	%COMPILE% -o $@ % `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+endif  !%?GENERIC%
diff --git a/t/lex-multiple.sh b/t/lex-multiple.sh
new file mode 100755
index 0000000..f15b3f3
--- /dev/null
+++ b/t/lex-multiple.sh
@@ -0,0 +1,106 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If we get ylwrap out of the way, we can build a program using
+# several lexers at once.
+
+required='cc flex'
+. ./defs || Exit 1
+
+cp "$am_scriptdir"/ar-lib . || fatal_ "fetching auxiliary script 'ar-lib'"
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_LEX
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-ylwrap
+
+bin_PROGRAMS = zardoz
+
+zardoz_SOURCES = main.c
+# Convenience libraries.
+noinst_LIBRARIES = liblex.a liblex-foo.a liblex-bar.a
+zardoz_LDADD = $(noinst_LIBRARIES)
+
+liblex_a_SOURCES = 0.l
+
+liblex_foo_a_LFLAGS = -Pfoo
+liblex_foo_a_SOURCES = a.l
+
+liblex_bar_a_LFLAGS = -Pbar_
+liblex_bar_a_SOURCES = b.l
+END
+
+cat > main.c << 'END'
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main (int argc, char *argv[])
+{
+  if (argc != 2)
+    abort ();
+  else if (!strcmp(argv[1], "--vanilla"))
+    return (yylex () != 121);
+  else if (!strcmp(argv[1], "--foo"))
+    return (foolex () != 121);
+  else if (!strcmp(argv[1], "--bar"))
+    return (bar_lex () != 121);
+  else
+    abort ();
+}
+END
+
+cat > 0.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%%
+"VANILLA" { printf (":%s:\n", yytext); return 121; }
+. { printf (":%s:\n", yytext); return 1; }
+%%
+/* Avoid possible link errors. */
+int yywrap (void) { return 1; }
+END
+
+sed 's/VANILLA/FOO/' 0.l > a.l
+sed 's/VANILLA/BAR/' 0.l > b.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+test ! -f ylwrap
+
+./configure
+$MAKE
+
+if ! cross_compiling; then
+  echo VANILLA | ./zardoz --vanilla
+  echo FOO | ./zardoz --foo
+  echo BAR | ./zardoz --bar
+  #./zardoz --vanilla </dev/null && exit 1
+  echo BAR | ./zardoz --foo && Exit 1
+  : For shells with buster 'set -e'.
+fi
+
+$MAKE distcheck
+
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index e16dd1d..a5962d9 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -30,8 +30,6 @@ t/pm/Version3.pl
 
 XFAIL_TESTS = \
 t/all.sh \
-t/yacc-bison-skeleton-cxx.sh \
-t/yacc-bison-skeleton.sh \
 t/cond17.sh \
 t/gcj6.sh \
 t/override-conditional-2.sh \
@@ -581,6 +579,7 @@ t/lex-depend-cxx.sh \
 t/lex-depend-grep.sh \
 t/lex-depend.sh \
 t/lex-line.sh \
+t/lex-multiple.sh \
 t/lex-nodist.sh \
 t/lex-pr204.sh \
 t/lflags.sh \
diff --git a/t/yacc-bison-skeleton-cxx.sh b/t/yacc-bison-skeleton-cxx.sh
index f5d8545..1ab3667 100755
--- a/t/yacc-bison-skeleton-cxx.sh
+++ b/t/yacc-bison-skeleton-cxx.sh
@@ -20,7 +20,10 @@
 required='c++ bison'
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
+cat > configure.ac << 'END'
+AC_INIT([C++ skeleton], [0.1])
+AM_INIT_AUTOMAKE([no-ylwrap])
+AC_CONFIG_FILES([Makefile])
 AC_PROG_CXX
 AC_PROG_YACC
 AC_OUTPUT
diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh
index 8cf957b..6cf7972 100755
--- a/t/yacc-bison-skeleton.sh
+++ b/t/yacc-bison-skeleton.sh
@@ -27,6 +27,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-ylwrap
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = zardoz.y foo.c
 AM_YFLAGS = -d --skeleton glr.c
-- 
1.7.9.5



From MAILER-DAEMON Tue Jun 26 10:27:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjWk9-00085d-Ka
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 10:27:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41165)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjWjy-00082l-3a
	for bug-bison@gnu.org; Tue, 26 Jun 2012 10:27:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjWjt-0006Ym-Aw
	for bug-bison@gnu.org; Tue, 26 Jun 2012 10:27:37 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:43567
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjWjt-0006YJ-4Z; Tue, 26 Jun 2012 10:27:33 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjWjp-0005Bu-Pn; Tue, 26 Jun 2012 16:27:29 +0200
Subject: Re: ylwrap does not rename y.tab.h in y.tab.c
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FE82FAA.7050203@gmail.com>
Date: Tue, 26 Jun 2012 16:27:34 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <D705F085-51CB-4ABE-91F1-085696E6FD23@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<CBF9F7A3-6F2C-41DC-A1D9-340602E52233@lrde.epita.fr>
	<79287948-0A36-42A5-B052-FE87C6736B52@lrde.epita.fr>
	<779B1E9A-9167-4C3B-BB2B-3A767DFEE80F@lrde.epita.fr>
	<B0B07281-04CE-451E-933E-2779341A41B6@lrde.epita.fr>
	<58E47CF9-C91C-4121-A10C-46F94049F2B2@lrde.epita.fr>
	<4FE82FAA.7050203@gmail.com>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Paul Eggert <eggert@CS.UCLA.EDU>, Bison Bugs <bug-bison@gnu.org>,
	"automake-patches@gnu.org" <automake-patches@gnu.org>,
	Bison Patches <bison-patches@gnu.org>, 11419@debbugs.gnu.org,
	Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 14:27:46 -0000

Hi all,

Le 25 juin 2012 =E0 11:30, Stefano Lattarini a =E9crit :

>> Well, I guess I must step back.  I installed what follows
>> in maint.
>>=20
> Sigh, advancement on Bison kept back by the fact that Automake used to
> bend over backwards to support inferior yacc implementation that today
> hardly anybody is using to build an autoconfiscated package.  It's now
> definitely time to implement a 'no-ylwrap' option that prevents the =
use
> of 'ylwrap'.  IMHO this option should go in Automake 1.12.2, become =
the
> default in Automake 1.13, and the only supported mode of operation in
> Automake 1.14 (unless real users object).

But in any case, ylwrap must also be fixed, if people still
want to stick to it.  And, BTW, glr parsers, C++ parsers
etc. are broken by ylwrap currently as they all use a
header and depend upon it.

A future version of bison will use it too for plain parsers.
People stuck with an old Automake can make a "y.tab.h" file
that just #includes "the-right-header.h" to work around the
issue.



From MAILER-DAEMON Tue Jun 26 10:34:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjWqr-0000AF-Jo
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 10:34:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54971)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjWqk-00008X-I9
	for bug-bison@gnu.org; Tue, 26 Jun 2012 10:34:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjWqe-00013A-8g
	for bug-bison@gnu.org; Tue, 26 Jun 2012 10:34:38 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:42333
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjWqA-0000sX-3s; Tue, 26 Jun 2012 10:34:02 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjWq6-0005SC-3x; Tue, 26 Jun 2012 16:33:58 +0200
Subject: Re: [PATCH] yacc,
	lex: new 'no-ylwrap' option to prevent use of the 'ylwrap' script
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
Date: Tue, 26 Jun 2012 16:34:02 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
References: <4FE82FAA.7050203@gmail.com>
	<7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: paul Eggert <eggert@CS.UCLA.EDU>, bug-bison@gnu.org,
	automake-patches@gnu.org, bison-patches@gnu.org,
	11419@debbugs.gnu.org, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 14:34:44 -0000

Hi Stefano,

Thanks for this!

Le 25 juin 2012 =E0 16:01, Stefano Lattarini a =E9crit :

> When used with good yacc and lex implementations, like Flex and GNU =
Bison,
> the 'ylwarp'

ylwrap

> script (meant to work around the deficiencies of older or
> inferior yacc and lex implementations) creates far more problems and
> annoyances than it solves.  For more details, just see the huge amount =
of
> related bug reports and complaints:
> =20

> use will allow us to switch the default in Automake 1.13 (i.e., we =
will
> start *not* using ylwrap by default) while still supporting users who
> want to continue using ylwrap.

Shouldn't some Autoconf machinery just check if -o is supported?
I don't see the need for the user to have to decide whether
to use ylwrap or not.  But I agree this is certainly harder to do.


>=20
> * lib/Automake/Options.pm (_is_valid_easy_option, =
_process_option_list):
> Recognize the options 'no-ylwrap' and 'ylwrap'.
> * automake.in (handle_languages): Pass the new transform =
'?USE-YLWRAP?'
> to the processed $rule_file; this transform expands to false if the
> 'no-ylwrap' option is used, and to true otherwise.
> (yacc_lex_finish_helper): Don't require nor copy the 'ylwrap' script =
if
> the 'no-ylwrap' option is active.
> * lib/am/lex.am, lib/am/yacc.am: Simplify rules not to use the =
'ylwrap'
> script if the '?USE-YLWRAP?' transform is true.  Related refactorings.
> * t/lex-multiple.sh: New test, checks that if we get ylwrap out of the
> way, we can build a program using several lexers at once.
> * t/list-of-tests.mk (handwritten_TESTS): Add it.
> * t/yacc-bison-skeleton.sh: Use the 'no-ylwrap' option.  This allow =
the

allows

> test to pass, at last!
> * t/yacc-bison-skeleton-cxx.sh: Likewise.
> * t/list-of-tests.mk (XFAIL_TESTS): Remove those two tests.
>=20

> @@ -333,6 +334,11 @@ sub _process_option_list (\%@)
>           # This is a little of an hack, but good enough for the =
moment.
>           delete $options->{'parallel-tests'};
>         }
> +      elsif ($_ eq 'ylwrap')
> +        {
> +          # This is a little of an hack, but good enough for the =
moment.

a hack (several times apparently :).

> +          delete $options->{'no-ylwrap'};
> +        }
>       elsif (/^filename-length-max=3D(\d+)$/)
>         {
>           delete $options->{$_};



From MAILER-DAEMON Tue Jun 26 11:35:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjXo3-0002yA-Sv
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 11:35:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33213)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1SjXo1-0002y4-PN
	for bug-bison@gnu.org; Tue, 26 Jun 2012 11:35:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1SjXnx-0004x6-5Y
	for bug-bison@gnu.org; Tue, 26 Jun 2012 11:35:53 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:37445)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1SjXnV-0004c0-3M; Tue, 26 Jun 2012 11:35:21 -0400
Received: by bkcjm19 with SMTP id jm19so61428bkc.0
	for <multiple recipients>; Tue, 26 Jun 2012 08:35:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=njM+IPiyPpYrZDOvRaq/xCn+lryZ1hx9oZW79ej56Cg=;
	b=PBg2Y4nF2AJM/fWQA+skKX8Zou6Ug/8Fh5owEtfrBnRASF4xAHDA6V+ptUTJ3yvU7j
	hC24d/qLTO7jpV05iis9C4bxUJJOzC+S46EDZDqvvlyEX5rIbE9Oz/azlQa6aj2q1vw4
	J0h10n1Cu3sO+exJJLZTP/2w1YuAX0bX2PBnSicgS8Vr7BXdJyMV6rH7eilH1qfKyLmw
	v02l0dKqo9+GLe2qbu0m22iX+ThWmPPjA/QFsLJ7p0azLfWRvr1hNg/rz0sq4V328VAy
	yq5dScPrjnUKgL1GPzEGJ4QxqLsVoi7hjXDycqFui7C5//wlJiUd6xZTq/D18O7mlEz9
	1HWw==
Received: by 10.204.136.214 with SMTP id s22mr5643907bkt.92.1340724915578;
	Tue, 26 Jun 2012 08:35:15 -0700 (PDT)
Received: from [82.60.30.36]
	(host36-30-dynamic.60-82-r.retail.telecomitalia.it. [82.60.30.36])
	by mx.google.com with ESMTPS id gw6sm51280335bkc.16.2012.06.26.08.35.13
	(version=SSLv3 cipher=OTHER); Tue, 26 Jun 2012 08:35:14 -0700 (PDT)
Message-ID: <4FE9D6AF.1000307@gmail.com>
Date: Tue, 26 Jun 2012 17:35:11 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: [PATCH] yacc, lex: new 'no-ylwrap' option to prevent use of the
	'ylwrap' script
References: <4FE82FAA.7050203@gmail.com>
	<7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
	<3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
In-Reply-To: <3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: paul Eggert <eggert@CS.UCLA.EDU>, bug-bison@gnu.org,
	automake-patches@gnu.org, bison-patches@gnu.org,
	11419@debbugs.gnu.org, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 15:35:55 -0000

On 06/26/2012 04:34 PM, Akim Demaille wrote:
> Hi Stefano,
> 
> Thanks for this!
> 
> Le 25 juin 2012 à 16:01, Stefano Lattarini a écrit :
> 
>> When used with good yacc and lex implementations, like Flex and GNU Bison,
>> the 'ylwarp'
> 
> ylwrap
> 
>> script (meant to work around the deficiencies of older or
>> inferior yacc and lex implementations) creates far more problems and
>> annoyances than it solves.  For more details, just see the huge amount of
>> related bug reports and complaints:
>>  
> 
>> use will allow us to switch the default in Automake 1.13 (i.e., we will
>> start *not* using ylwrap by default) while still supporting users who
>> want to continue using ylwrap.
> 
> Shouldn't some Autoconf machinery just check if -o is supported?
>
This is probably a better idea, yes.  This could probably be done by
enhancing AM_PROG_LEX and defining a similar new AM_PROG_YACC macro.
Or better again, it could be done directly in AC_PROG_LEX and
AC_PROG_YACC, so that we could just rely on them in the future
(in the meantime, we could copy their new definitions in our
'm4/' directories, so that the new improved definitions will still
be accessible to users with older Autoconfs).

> I don't see the need for the user to have to decide whether
> to use ylwrap or not.  But I agree this is certainly harder to do.
>
Not much harder actually; and it's certainly much nicer to DTRT
instead of throwing another knob to tweak to the poor developer.
So I'll certainly give your proposal a try.

Thanks,
  Stefano


From MAILER-DAEMON Tue Jun 26 11:59:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjYAq-0008Ks-Hq
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 11:59:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49473)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjYAj-0008K9-FT
	for bug-bison@gnu.org; Tue, 26 Jun 2012 11:59:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjYAd-0006PF-Ct
	for bug-bison@gnu.org; Tue, 26 Jun 2012 11:59:21 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:33088
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjYAC-0006Ea-O0; Tue, 26 Jun 2012 11:58:48 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjYA8-0000hA-1B; Tue, 26 Jun 2012 17:58:44 +0200
Subject: Re: [PATCH] yacc,
	lex: new 'no-ylwrap' option to prevent use of the 'ylwrap' script
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FE9D6AF.1000307@gmail.com>
Date: Tue, 26 Jun 2012 17:58:48 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <83BCA4E7-D9C7-45C1-BEF8-5D76ED39D218@lrde.epita.fr>
References: <4FE82FAA.7050203@gmail.com>
	<7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
	<3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
	<4FE9D6AF.1000307@gmail.com>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: paul Eggert <eggert@CS.UCLA.EDU>, bug-bison@gnu.org,
	automake-patches@gnu.org, bison-patches@gnu.org,
	11419@debbugs.gnu.org, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 15:59:27 -0000


Le 26 juin 2012 =E0 17:35, Stefano Lattarini a =E9crit :

> This is probably a better idea, yes.  This could probably be done by
> enhancing AM_PROG_LEX and defining a similar new AM_PROG_YACC macro.
> Or better again, it could be done directly in AC_PROG_LEX and
> AC_PROG_YACC, so that we could just rely on them in the future
> (in the meantime, we could copy their new definitions in our
> 'm4/' directories, so that the new improved definitions will still
> be accessible to users with older Autoconfs).

I had sent a message about such macros to Autoconf, but
to no avail.

http://lists.gnu.org/archive/html/autoconf-patches/2012-04/msg00001.html

This initial work leaves in Bison as m4/flex.m4.  I know there is
work to do (test, doc etc.), but at least I'd like some feedback.
Then I'll proceed to Yacc/Bison.



From MAILER-DAEMON Tue Jun 26 12:19:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjYU5-000640-O5
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 12:19:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37260)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SjYU0-00063P-Gg
	for bug-bison@gnu.org; Tue, 26 Jun 2012 12:19:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SjYTu-0007E0-89
	for bug-bison@gnu.org; Tue, 26 Jun 2012 12:19:16 -0400
Received: from mx1.redhat.com ([209.132.183.28]:48364)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1SjYTu-0007D3-0N; Tue, 26 Jun 2012 12:19:10 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5QGIuHB009437
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 26 Jun 2012 12:18:56 -0400
Received: from [10.3.113.134] (ovpn-113-134.phx2.redhat.com [10.3.113.134])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q5QGIt5c021896; Tue, 26 Jun 2012 12:18:55 -0400
Message-ID: <4FE9E0EE.5060406@redhat.com>
Date: Tue, 26 Jun 2012 10:18:54 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: [PATCH] yacc, lex: new 'no-ylwrap' option to prevent use of the
	'ylwrap' script
References: <4FE82FAA.7050203@gmail.com>
	<7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
	<3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
	<4FE9D6AF.1000307@gmail.com>
	<83BCA4E7-D9C7-45C1-BEF8-5D76ED39D218@lrde.epita.fr>
In-Reply-To: <83BCA4E7-D9C7-45C1-BEF8-5D76ED39D218@lrde.epita.fr>
X-Enigmail-Version: 1.4.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigEFB0C31DEAE7C0D34E232918"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: paul Eggert <eggert@CS.UCLA.EDU>, Autoconf <Autoconf@gnu.org>,
	bug-bison@gnu.org, automake-patches@gnu.org,
	bison-patches@gnu.org, 11419@debbugs.gnu.org,
	Stefano Lattarini <stefano.lattarini@gmail.com>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 16:19:21 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigEFB0C31DEAE7C0D34E232918
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

[adding autoconf]

On 06/26/2012 09:58 AM, Akim Demaille wrote:
>=20
> Le 26 juin 2012 =E0 17:35, Stefano Lattarini a =E9crit :
>=20
>> This is probably a better idea, yes.  This could probably be done by
>> enhancing AM_PROG_LEX and defining a similar new AM_PROG_YACC macro.
>> Or better again, it could be done directly in AC_PROG_LEX and
>> AC_PROG_YACC, so that we could just rely on them in the future
>> (in the meantime, we could copy their new definitions in our
>> 'm4/' directories, so that the new improved definitions will still
>> be accessible to users with older Autoconfs).
>=20
> I had sent a message about such macros to Autoconf, but
> to no avail.
>=20
> http://lists.gnu.org/archive/html/autoconf-patches/2012-04/msg00001.htm=
l

Eek - that just shows that I'm really behind on reading my email.

Just from reading this summary, the idea of improving AC_PROG_LEX and
AC_PROG_YACC to be more useful makes sense, especially if it would make
automake easier to maintain.  What sort of improvements are needed?

>=20
> This initial work leaves in Bison as m4/flex.m4.  I know there is
> work to do (test, doc etc.), but at least I'd like some feedback.
> Then I'll proceed to Yacc/Bison.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org




--------------enigEFB0C31DEAE7C0D34E232918
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJP6eDuAAoJEKeha0olJ0NqLvsH/18zJATQtaARJlQiggh+x2bW
uWowrke+6glvd2zjxDCDkSito+QcbX9MacRURHRbcGrn00jRMsaJfGbBc8FNrGDl
5rsf88mHHvQCjXruKR4XJ0BR0VglnjWfkncuCi9dCjamKCEH1d6u6/EdGx4S+gMj
j1u5NBrL75+w4R2F3ohVqIkmY/TAJi3R8LJDI+rMoBjF369NaT6T97hUK4x2eUO3
cOg9pDsRHpOGLWo3ZBZ/x/s262TxcGBRvNvPuGwv2D+QTagLGePiQtJz2ZFqCDuK
JMX5GPZ5TZGoUQ1U9QZFKPaKv91yemRrCHpM1BZz0nPGIaGRLXDxYwsvA1cFVoI=
=1b99
-----END PGP SIGNATURE-----

--------------enigEFB0C31DEAE7C0D34E232918--


From MAILER-DAEMON Tue Jun 26 12:27:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjYc6-0001BM-DO
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 12:27:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43320)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjYc3-00010c-1C
	for bug-bison@gnu.org; Tue, 26 Jun 2012 12:27:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SjYbw-0002si-UL
	for bug-bison@gnu.org; Tue, 26 Jun 2012 12:27:34 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:49578
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjYbw-0002re-OE; Tue, 26 Jun 2012 12:27:28 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SjYbq-00026E-LQ; Tue, 26 Jun 2012 18:27:22 +0200
Subject: Re: [PATCH] yacc,
	lex: new 'no-ylwrap' option to prevent use of the 'ylwrap' script
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FE9E0EE.5060406@redhat.com>
Date: Tue, 26 Jun 2012 18:27:27 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <C5CE8B50-8811-4963-943C-B67A187F5627@lrde.epita.fr>
References: <4FE82FAA.7050203@gmail.com>
	<7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
	<3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
	<4FE9D6AF.1000307@gmail.com>
	<83BCA4E7-D9C7-45C1-BEF8-5D76ED39D218@lrde.epita.fr>
	<4FE9E0EE.5060406@redhat.com>
To: Eric Blake <eblake@redhat.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: paul Eggert <eggert@CS.UCLA.EDU>, Autoconf <Autoconf@gnu.org>,
	bug-bison@gnu.org, automake-patches@gnu.org,
	bison-patches@gnu.org, 11419@debbugs.gnu.org,
	Stefano Lattarini <stefano.lattarini@gmail.com>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 16:27:36 -0000

(wow, _that_ is quite a list of CCs.  Hi mum!)

Hi Eric,

Le 26 juin 2012 =E0 18:18, Eric Blake a =E9crit :

> Eek - that just shows that I'm really behind on reading my email.

Thou shalt be punished.  Beware of my wrath.

> Just from reading this summary, the idea of improving AC_PROG_LEX and
> AC_PROG_YACC to be more useful makes sense, especially if it would =
make
> automake easier to maintain.  What sort of improvements are needed?

In the present case, I believe the only thing Automake needs
to know is whether -o is supported by lex/yacc.=


From MAILER-DAEMON Tue Jun 26 12:58:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SjZ5e-0003Aj-3a
	for mharc-bug-bison@gnu.org; Tue, 26 Jun 2012 12:58:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:32904)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1SjZ5W-00039K-5E
	for bug-bison@gnu.org; Tue, 26 Jun 2012 12:58:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1SjZ5U-00082B-6J
	for bug-bison@gnu.org; Tue, 26 Jun 2012 12:58:01 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:52883)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1SjZ5T-00080y-Ss; Tue, 26 Jun 2012 12:58:00 -0400
Received: by bkcjm19 with SMTP id jm19so178047bkc.0
	for <multiple recipients>; Tue, 26 Jun 2012 09:57:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=s3hVL2Dt+4gZ7rPnbOx2nKHdYhMfoO0KlB6XaafHego=;
	b=VxI/smH2gdAxjhhhLT76Cee3H3mMX7rK6320odkBXIR0ET45iVidNqgCzFMFNLZnHT
	8R80WhD16RuGtQAg3FjS16ktlFGzkEzNumJNTInIpwdZGm0WQcD8TIJzswEVg7RSLvhx
	ZlzvfhtC/iNqW1UeJgJK1D3P3TgKf/P5C706KKPm5R0H65MBFVlNBuqMZFjJpcwU14mH
	mVWVklzpoCq5iDkc7MetLz/KassAxavWLwG25vVH7feXRps0gzOmVv34SwQ9eMrlB5Hv
	GMPlEjNO6zu4TmFcjgNiMWES7O6IHOIEklcSKpmJOnwNTRaU0YcSFpcT72/xuHS3Yj3O
	oWnw==
Received: by 10.205.129.8 with SMTP id hg8mr5831951bkc.25.1340729874631;
	Tue, 26 Jun 2012 09:57:54 -0700 (PDT)
Received: from [82.60.30.36]
	(host36-30-dynamic.60-82-r.retail.telecomitalia.it. [82.60.30.36])
	by mx.google.com with ESMTPS id h18sm51578856bkh.8.2012.06.26.09.57.51
	(version=SSLv3 cipher=OTHER); Tue, 26 Jun 2012 09:57:53 -0700 (PDT)
Message-ID: <4FE9EA0D.5000706@gmail.com>
Date: Tue, 26 Jun 2012 18:57:49 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Akim Demaille <akim@lrde.epita.fr>
Subject: Re: [PATCH] yacc, lex: new 'no-ylwrap' option to prevent use of the
	'ylwrap' script
References: <4FE82FAA.7050203@gmail.com>
	<7d2f266f017355027cbe9e6eed79885304f9caa2.1340632028.git.stefano.lattarini@gmail.com>
	<3F3F45CF-F8FF-4D1A-B5D9-3E773BCF92B7@lrde.epita.fr>
	<4FE9D6AF.1000307@gmail.com>
	<83BCA4E7-D9C7-45C1-BEF8-5D76ED39D218@lrde.epita.fr>
	<4FE9E0EE.5060406@redhat.com>
	<C5CE8B50-8811-4963-943C-B67A187F5627@lrde.epita.fr>
In-Reply-To: <C5CE8B50-8811-4963-943C-B67A187F5627@lrde.epita.fr>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: paul Eggert <eggert@CS.UCLA.EDU>, Autoconf <Autoconf@gnu.org>,
	bug-bison@gnu.org, automake-patches@gnu.org,
	bison-patches@gnu.org, 11419@debbugs.gnu.org,
	Bruce Korb <bkorb@gnu.org>, Eric Blake <eblake@redhat.com>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2012 16:58:08 -0000

Hi Eric.

On 06/26/2012 06:27 PM, Akim Demaille wrote:
>
> Le 26 juin 2012 Ã  18:18, Eric Blake a Ã©crit :
> 
>> Just from reading this summary, the idea of improving AC_PROG_LEX and
>> AC_PROG_YACC to be more useful makes sense, especially if it would make
>> automake easier to maintain.  What sort of improvements are needed?
> 
> In the present case, I believe the only thing Automake needs
> to know is whether -o is supported by lex/yacc.
>
Yes.  And to ensure proper compatibility with C++ and with the use of the
'-d' option, we should consider the '-o' support good enough only provided
that, when "yacc -d -o foo.C-EXT" is used, the name of the created header
is "foo.H-EXT", where H-EXT is C-EXT with all 'c' characters substituted
by 'h' ones (so that foo.c -> foo.h, foo.c++ -> foo.h++, foo.cc -> foo.hh,
etc).  This is what Bison does.

Once we know that lex supports '-o', the determination of the value of
$LEX_OUTPUT_ROOT will mostly become moot, and could be dispensed with
(at least for what concerns Automake).

Also, it would be nice if AC_PROG_YACC and AC_PROG_LEX would allow us to
change the list of the searched programs (this will allow the Automake
configure script to prefer non-bison 'yacc' and non-flex 'lex' programs
for use in the testsuite, to ensure better coverage).

Finally, while we are at it, we might also think about making default
values for $YACC and $LEX configurable (rather than hard-coding them
to resp. 'yacc' and ':').

Oh, and setting a couple of (self-explanatory) variables $LEX_IS_FLEX
and $YACC_IS_BISON wouldn't hurt (albeit it would not be needed by
Automake at this point).

Regards,
  Stefano


From MAILER-DAEMON Thu Jun 28 05:45:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SkBI5-0005og-Ow
	for mharc-bug-bison@gnu.org; Thu, 28 Jun 2012 05:45:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60904)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SkBHu-0005oC-L8
	for bug-bison@gnu.org; Thu, 28 Jun 2012 05:45:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SkBHp-000346-RM
	for bug-bison@gnu.org; Thu, 28 Jun 2012 05:45:22 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:42890
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SkBHp-0002zv-Cg; Thu, 28 Jun 2012 05:45:17 -0400
Received: from [192.168.105.43] by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SkBHm-00030t-5h; Thu, 28 Jun 2012 11:45:14 +0200
Subject: Re: yacc.c does not prototype yyparse in the header
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: multipart/mixed;
	boundary="Apple-Mail=_C116733C-DF7D-4C28-B9A6-75C9D67D68C3"
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <4FD8C479.6030703@cs.ucla.edu>
Date: Thu, 28 Jun 2012 11:45:16 +0200
Message-Id: <F8390949-E9DA-4632-8C04-A087D7E76757@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<4FD5BA89.0@cs.ucla.edu>
	<59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
	<4FD77125.2070807@cs.ucla.edu>
	<AE9C526A-D5C4-4AAB-80F2-7D12BF1A4C86@lrde.epita.fr>
	<4FD8C479.6030703@cs.ucla.edu>
To: Paul Eggert <eggert@cs.ucla.edu>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Jun 2012 09:45:32 -0000


--Apple-Mail=_C116733C-DF7D-4C28-B9A6-75C9D67D68C3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=iso-8859-1


Le 13 juin 2012 =E0 18:48, Paul Eggert a =E9crit :

> On 06/13/2012 12:03 AM, Akim Demaille wrote:
>> Another, completely different, course of action would be
>> to deprecate %name-prefix and leave it as is, and promote
>> something like
>>=20
>>  %define api.prefix "foo"
>>=20
>> which, this time, would also cover the types.
>=20
> Yes, thanks, this sounds better to me too.

This is an initial patch.  I think the code part is mature,
but there remains to document this more thoroughly.  I would
certainly appreciate comments :)


--Apple-Mail=_C116733C-DF7D-4C28-B9A6-75C9D67D68C3
Content-Disposition: attachment;
	filename=0001-api.prefix.patch
Content-Type: application/octet-stream;
	name="0001-api.prefix.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=20df213193d8dc7c5b12420710e328345c6e2c973e=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20Akim=20Demaille=20<akim@lrde.epita.fr>=0ADate:=20=
Tue,=2026=20Jun=202012=2010:09:10=20+0200=0ASubject:=20[PATCH]=20=
api.prefix.=0A=0A*=20data/c.m4=20(b4_api_prefix,=20b4_api_PREFIX):=20=
New.=0A(b4_prefix,=20b4_union_name,=20b4_token_enums,=20=
b4_declare_yylstype):=20Use=20them.=0A*=20data/glr.c,=20data/yacc.c,=20=
data/glr.cc,=20data/lalr1.cc:=20Use=20them=20to=20change=0Athe=20prefix=20=
of=20exported=20preprocessor=20symbols.=0A*=20tests/headers.at=20=
(Several=20parsers):=20New.=0A*=20tests/local.at=20(AT_API_PREFIX):=20=
New.=0AAT_YYSTYPE,=20AT_YYLTYPE):=20Adjust.=0A*=20NEWS:=20Announce=20=
api.prefix.=0A*=20doc/bison.texi=20(%define=20Summary):=20Add=20=
api.prefix.=0A---=0A=20NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20|=2055=20=
+++++++++++++++++++++++++++++++++++=0A=20data/c.m4=20=20=20=20=20=20=20=20=
|=2065=20++++++++++++++++++++++++-----------------=0A=20data/glr.c=20=20=20=
=20=20=20=20|=20=208=20++++++=0A=20data/glr.cc=20=20=20=20=20=20|=2014=20=
++++-----=0A=20data/lalr1.cc=20=20=20=20|=2012=20++++----=0A=20=
data/yacc.c=20=20=20=20=20=20|=2010=20++++++-=0A=20doc/bison.texi=20=20=20=
|=2017=20+++++++++++=0A=20tests/headers.at=20|=2088=20=
++++++++++++++++++++++++++++++++++++++++++++++++++++++++=0A=20=
tests/local.at=20=20=20|=20=207=20+++--=0A=209=20files=20changed,=20234=20=
insertions(+),=2042=20deletions(-)=0A=0Adiff=20--git=20a/NEWS=20b/NEWS=0A=
index=2033fac14..6100cac=20100644=0A---=20a/NEWS=0A+++=20b/NEWS=0A@@=20=
-70,6=20+70,61=20@@=20GNU=20Bison=20NEWS=0A=20=20=20For=20the=20same=20=
reasons,=20the=20undocumented=20and=20unused=20macro=20YYLSP_NEEDED=20is=20=
no=0A=20=20=20longer=20defined.=0A=20=0A+**=20New=20%define=20variable:=20=
api.prefix=0A+=0A+=20=20Now=20that=20the=20generated=20headers=20are=20=
more=20complete=20and=20properly=20protected=0A+=20=20against=20multiple=20=
inclusions,=20constant=20names,=20such=20as=20YYSTYPE=20are=20a=0A+=20=20=
problem.=20=20While=20yyparse=20and=20other=20are=20properly=20renamed=20=
by=20%name-prefix,=0A+=20=20YYSTYPE,=20YYDEBUG=20and=20other=20have=20=
never=20been=20affected=20by=20it.=20=20Because=20it=0A+=20=20would=20=
introduce=20backward=20compatibility=20issues=20where=20it=20is=20not=20=
expected=0A+=20=20that=20YYSTYPE=20would=20be=20renamed,=20instead=20of=20=
changing=20the=20behavior=20of=0A+=20=20%name-prefix,=20it=20was=20=
decided=20to=20deprecate=20it=20in=20favor=20of=20a=20new=20%define=0A+=20=
=20variable:=20api.prefix.=0A+=0A+=20=20The=20following=20examples=20=
compares=20both:=0A+=0A+=20=20=20=20%name-prefix=20"bar_"=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20|=20%define=20api.prefix=20"bar_"=0A+=20=20=20=
=20%token=20<ival>=20FOO=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20%token=20<ival>=20FOO=0A+=20=20=20=20%union=20{=20int=20ival;=20}=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20%union=20{=20int=20ival;=20=
}=0A+=20=20=20=20%%=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20%%=0A+=20=20=20=20exp:=20=
'a';=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20exp:=20'a';=0A+=0A+=20=20bison=20generates=0A+=0A+=20=20=20=20=
#ifndef=20BAR_FOO_H=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20#ifndef=20BAR_FOO_H=0A+=20=20=20=20#=20define=20BAR_FOO_H=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20#=20define=20BAR_FOO_H=0A+=0A+=20=20=
=20=20/*=20Enabling=20traces.=20=20*/=20=20=20=20=20=20=20=20=20=20=20=20=
=20/*=20Enabling=20traces.=20=20*/=0A+=20=20=20=20#=20ifndef=20YYDEBUG=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#=20ifndef=20=
YYDEBUG=0A+=20=20=20=20#=20=20define=20YYDEBUG=200=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20#=20=20define=20YYDEBUG=200=0A+=20=20=20=20#=20=
endif=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20#=20endif=0A+=20=20=20=20#=20if=20YYDEBUG=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#=20if=20=
YYDEBUG=0A+=20=20=20=20extern=20int=20bar_debug;=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20extern=20int=20bar_debug;=0A+=20=20=20=20#=20endif=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20#=20endif=0A+=0A+=20=20=20=20/*=20Tokens.=20=20*/=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20/*=20Tokens.=20=20*/=0A+=20=
=20=20=20#=20ifndef=20YYTOKENTYPE=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
|=20#=20ifndef=20BAR_TOKENTYPE=0A+=20=20=20=20#=20=20define=20=
YYTOKENTYPE=20=20=20=20=20=20=20=20=20=20=20=20=20|=20#=20=20define=20=
BAR_TOKENTYPE=0A+=20=20=20=20=20=20=20enum=20yytokentype=20{=20=20=20=20=20=
=20=20=20=20=20=20=20=20|=20=20=20=20enum=20bar_tokentype=20{=0A+=20=20=20=
=20=20=20=20=20=20FOO=20=3D=20258=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20FOO=20=3D=20258=0A+=20=20=20=20=20=
=20=20};=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20};=0A+=20=20=20=20#=20endif=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
#=20endif=0A+=0A+=20=20=20=20#if=20!=20defined=20YYSTYPE=20\=20=20=20=20=20=
=20=20=20=20=20=20|=20#if=20!=20defined=20BAR_STYPE=20\=0A+=20=20=20=20=20=
&&=20!=20defined=20YYSTYPE_IS_DECLARED=20|=20=20&&=20!=20defined=20=
BAR_STYPE_IS_DECLARED=0A+=20=20=20=20typedef=20union=20YYSTYPE=20=20=20=20=
=20=20=20=20=20=20=20=20=20|=20typedef=20union=20BAR_STYPE=0A+=20=20=20=20=
{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20{=0A+=20=20=20=20=20int=20ival;=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
int=20ival;=0A+=20=20=20=20}=20YYSTYPE;=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20|=20}=20BAR_STYPE;=0A+=20=20=20=20#=20=
define=20YYSTYPE_IS_DECLARED=201=20=20=20=20|=20#=20define=20=
BAR_STYPE_IS_DECLARED=201=0A+=20=20=20=20#endif=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#endif=0A=
+=0A+=20=20=20=20extern=20YYSTYPE=20bar_lval;=20=20=20=20=20=20=20=20=20=20=
|=20extern=20BAR_STYPE=20bar_lval;=0A+=0A+=20=20=20=20int=20bar_parse=20=
(void);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20int=20bar_parse=20=
(void);=0A+=0A+=20=20=20=20#endif=20/*=20!BAR_FOO_H=20=20*/=20=20=20=20=20=
=20=20=20=20=20=20=20#endif=20/*=20!BAR_FOO_H=20=20*/=0A+=0A=20*=20=
Noteworthy=20changes=20in=20release=202.5.1=20(2012-06-05)=20[stable]=0A=20=
=0A=20**=20Future=20changes:=0Adiff=20--git=20a/data/c.m4=20b/data/c.m4=0A=
index=201f266a4..0b2699a=20100644=0A---=20a/data/c.m4=0A+++=20=
b/data/c.m4=0A@@=20-84,11=20+84,24=20@@=20m4_define([b4_identification],=0A=
=20##=20Default=20values.=20=20##=0A=20##=20----------------=20##=0A=20=0A=
+#=20b4_api_prefix,=20b4_api_PREFIX=0A+#=20----------------------------=0A=
+#=20Corresponds=20to=20%define=20api.prefix=0A=
+b4_percent_define_default([[api.prefix]],=20[[yy]])=0A=
+m4_define([b4_api_prefix],=0A+[b4_percent_define_get([[api.prefix]])])=0A=
+m4_define([b4_api_PREFIX],=0A+[m4_toupper(b4_api_prefix)])=0A+=0A+=0A+#=20=
b4_prefix=0A+#=20---------=0A+#=20If=20the=20%name-prefix=20is=20not=20=
given,=20it=20is=20api.prefix.=0A+m4_define_default([b4_prefix],=20=
[b4_api_prefix])=0A+=0A=20#=20If=20the=20%union=20is=20not=20named,=20=
its=20name=20is=20YYSTYPE.=0A-m4_define_default([b4_union_name],=20=
[YYSTYPE])=0A+m4_define_default([b4_union_name],=20=
[b4_api_PREFIX[]STYPE])=0A=20=0A-#=20If=20the=20%name-prefix=20is=20not=20=
given,=20it=20is=20yy.=0A-m4_define_default([b4_prefix],=20[yy])=0A=20=0A=
=20##=20------------------------=20##=0A=20##=20Pure/impure=20=
interfaces.=20=20##=0A@@=20-232,18=20+245,18=20@@=20=
m4_define([b4_token_enum],=0A=20#=20Output=20the=20definition=20of=20the=20=
tokens=20(if=20there=20are)=20as=20enums.=0A=20=
m4_define([b4_token_enums],=0A=20[m4_if([$#$1],=20[1],=20[],=0A-[/*=20=
Tokens.=20=20*/=0A-#ifndef=20YYTOKENTYPE=0A-#=20define=20YYTOKENTYPE=0A=
+[[/*=20Tokens.=20=20*/=0A+#ifndef=20]b4_api_PREFIX[TOKENTYPE=0A+#=20=
define=20]b4_api_PREFIX[TOKENTYPE=0A=20=20=20=20/*=20Put=20the=20tokens=20=
into=20the=20symbol=20table,=20so=20that=20GDB=20and=20other=20debuggers=0A=
=20=20=20=20=20=20=20know=20about=20them.=20=20*/=0A-=20=20=20enum=20=
yytokentype=20{=0A-m4_map_sep([=20=20=20=20=20b4_token_enum],=20[,=0A+=20=
=20=20enum=20]b4_api_prefix[tokentype=20{=0A+]m4_map_sep([=20=20=20=20=20=
b4_token_enum],=20[,=0A=20],=0A-=09=20=20=20[$@])=0A+=09=20=20=20[$@])[=0A=
=20=20=20=20};=0A=20#endif=0A-])])=0A+]])])=0A=20=0A=20=0A=20#=20=
b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)=0A@@=20=
-533,39=20+546,39=20@@=20b4_locations_if([,=20=
yylocationp])[]b4_user_args[);=0A=20##=20--------------=20##=0A=20=0A=20=
#=20b4_declare_yylstype=0A-#=20------------------=0A+#=20=
-------------------=0A=20#=20Declarations=20that=20might=20either=20go=20=
into=20the=20header=20(if=20--defines)=20or=0A=20#=20in=20the=20parser=20=
body.=20=20Declare=20YYSTYPE/YYLTYPE,=20and=20yylval/yylloc.=0A=20=
m4_define([b4_declare_yylstype],=0A-[[#if=20!=20defined=20YYSTYPE=20&&=20=
!=20defined=20YYSTYPE_IS_DECLARED=0A+[[#if=20!=20defined=20=
]b4_api_PREFIX[STYPE=20&&=20!=20defined=20=
]b4_api_PREFIX[STYPE_IS_DECLARED=0A=20]m4_ifdef([b4_stype],=0A=20=
[[typedef=20union=20]b4_union_name[=0A=20{=0A=20]b4_user_stype[=0A-}=20=
YYSTYPE;=0A-#=20define=20YYSTYPE_IS_TRIVIAL=201]],=0A+}=20=
]b4_api_PREFIX[STYPE;=0A+#=20define=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=20=
1]],=0A=20[m4_if(b4_tag_seen_flag,=200,=0A-[[typedef=20int=20YYSTYPE;=0A=
-#=20define=20YYSTYPE_IS_TRIVIAL=201]])])[=0A-#=20define=20yystype=20=
YYSTYPE=20/*=20obsolescent;=20will=20be=20withdrawn=20*/=0A-#=20define=20=
YYSTYPE_IS_DECLARED=201=0A+[[typedef=20int=20]b4_api_PREFIX[STYPE;=0A+#=20=
define=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=201]])])[=0A+#=20define=20=
]b4_api_prefix[stype=20]b4_api_PREFIX[STYPE=20/*=20obsolescent;=20will=20=
be=20withdrawn=20*/=0A+#=20define=20]b4_api_PREFIX[STYPE_IS_DECLARED=201=0A=
=20#endif]b4_locations_if([[=0A=20=0A-#if=20!=20defined=20YYLTYPE=20&&=20=
!=20defined=20YYLTYPE_IS_DECLARED=0A-typedef=20struct=20YYLTYPE=0A+#if=20=
!=20defined=20]b4_api_PREFIX[LTYPE=20&&=20!=20defined=20=
]b4_api_PREFIX[LTYPE_IS_DECLARED=0A+typedef=20struct=20=
]b4_api_PREFIX[LTYPE=0A=20{=0A=20=20=20int=20first_line;=0A=20=20=20int=20=
first_column;=0A=20=20=20int=20last_line;=0A=20=20=20int=20last_column;=0A=
-}=20YYLTYPE;=0A-#=20define=20yyltype=20YYLTYPE=20/*=20obsolescent;=20=
will=20be=20withdrawn=20*/=0A-#=20define=20YYLTYPE_IS_DECLARED=201=0A-#=20=
define=20YYLTYPE_IS_TRIVIAL=201=0A+}=20]b4_api_PREFIX[LTYPE;=0A+#=20=
define=20]b4_api_prefix[ltype=20]b4_api_PREFIX[LTYPE=20/*=20obsolescent;=20=
will=20be=20withdrawn=20*/=0A+#=20define=20=
]b4_api_PREFIX[LTYPE_IS_DECLARED=201=0A+#=20define=20=
]b4_api_PREFIX[LTYPE_IS_TRIVIAL=201=0A=20#endif]])=0A=20=0A=
-b4_pure_if([],=20[[extern=20YYSTYPE=20]b4_prefix[lval;=0A=
-]b4_locations_if([[extern=20YYLTYPE=20]b4_prefix[lloc;]])])[]dnl=0A=
+b4_pure_if([],=20[[extern=20]b4_api_PREFIX[STYPE=20]b4_prefix[lval;=0A=
+]b4_locations_if([[extern=20]b4_api_PREFIX[LTYPE=20=
]b4_prefix[lloc;]])])[]dnl=0A=20])=0A=20=0A=20#=20b4_declare_yydebug=0A=
diff=20--git=20a/data/glr.c=20b/data/glr.c=0Aindex=20699d730..ce61160=20=
100644=0A---=20a/data/glr.c=0A+++=20b/data/glr.c=0A@@=20-188,6=20+188,14=20=
@@=20b4_copyright([Skeleton=20implementation=20for=20Bison=20GLR=20=
parsers=20in=20C],=0A=20]b4_identification=0A=20=0A=20=
b4_percent_code_get([[top]])[=0A+]m4_if(b4_api_prefix,=20[yy],=20[],=0A=
+[[/*=20Substitute=20the=20type=20names.=20=20*/=0A+#define=20YYSTYPE=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[STYPE=0A+#define=20=
YYSTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=0A+#define=20=
YYSTYPE_IS_DECLARED=20=20=
]b4_api_PREFIX[STYPE_IS_DECLARED]b4_locations_if([[=0A+#define=20YYLTYPE=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[LTYPE=0A+#define=20=
YYLTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[LTYPE_IS_TRIVIAL=0A+#define=20=
YYLTYPE_IS_DECLARED=20=20]b4_api_PREFIX[LTYPE_IS_DECLARED]])])[=0A=20=
]m4_if(b4_prefix,=20[yy],=20[],=0A=20[[/*=20Substitute=20the=20variable=20=
and=20function=20names.=20=20*/=0A=20#define=20yyparse=20=
]b4_prefix[parse=0Adiff=20--git=20a/data/glr.cc=20b/data/glr.cc=0Aindex=20=
8e46be3..d1eb6bd=20100644=0A---=20a/data/glr.cc=0A+++=20b/data/glr.cc=0A=
@@=20-269,7=20+269,7=20@@=20b4_copyright([Skeleton=20interface=20for=20=
Bison=20GLR=20parsers=20in=20C++],=0A=20=20=20{=0A=20=20=20public:=0A=20=20=
=20=20=20///=20Symbol=20semantic=20values.=0A-#ifndef=20YYSTYPE=0A=
+#ifndef=20]b4_api_PREFIX[STYPE=0A=20]m4_ifdef([b4_stype],=0A=20[=20=20=20=
=20union=20semantic_type=0A=20=20=20=20=20{=0A@@=20-277,9=20+277,9=20@@=20=
b4_user_stype=0A=20=20=20=20=20};],=0A=20[m4_if(b4_tag_seen_flag,=200,=0A=
=20[[=20=20=20=20typedef=20int=20semantic_type;]],=0A-[[=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;]])])[=0A+[[=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;]])])[=0A=20#else=0A-=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;=0A+=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;=0A=20#endif=0A=20=20=20=20=20///=20=
Symbol=20locations.=0A=20=20=20=20=20typedef=20=
]b4_percent_define_get([[location_type]],=0A@@=20-350,11=20+350,11=20@@=20=
b4_user_stype=0A=20=
b4_percent_define_flag_if([[global_tokens_and_yystype]],=0A=20=
[b4_token_defines(b4_tokens)])=0A=20[=0A-#ifndef=20YYSTYPE=0A-#=20define=20=
YYSTYPE=20]b4_namespace_ref[::]b4_parser_class_name[::semantic_type=0A=
+#ifndef=20]b4_api_PREFIX[STYPE=0A+#=20define=20]b4_api_PREFIX[STYPE=20=
]b4_namespace_ref[::]b4_parser_class_name[::semantic_type=0A=20#endif=0A=
-#ifndef=20YYLTYPE=0A-#=20define=20YYLTYPE=20=
]b4_namespace_ref[::]b4_parser_class_name[::location_type=0A+#ifndef=20=
]b4_api_PREFIX[LTYPE=0A+#=20define=20]b4_api_PREFIX[LTYPE=20=
]b4_namespace_ref[::]b4_parser_class_name[::location_type=0A=20#endif=0A=20=
=0A=20]b4_namespace_close[=0Adiff=20--git=20a/data/lalr1.cc=20=
b/data/lalr1.cc=0Aindex=20e82e654..337af10=20100644=0A---=20=
a/data/lalr1.cc=0A+++=20b/data/lalr1.cc=0A@@=20-69,7=20+69,7=20@@=20=
b4_copyright([Skeleton=20interface=20for=20Bison=20LALR(1)=20parsers=20=
in=20C++],=0A=20=20=20{=0A=20=20=20public:=0A=20=20=20=20=20///=20Symbol=20=
semantic=20values.=0A-#ifndef=20YYSTYPE=0A+#ifndef=20=
]b4_api_PREFIX[STYPE=0A=20]m4_ifdef([b4_stype],=0A=20[=20=20=20=20union=20=
semantic_type=0A=20=20=20=20=20{=0A@@=20-77,9=20+77,9=20@@=20=
b4_user_stype=0A=20=20=20=20=20};],=0A=20[m4_if(b4_tag_seen_flag,=200,=0A=
=20[[=20=20=20=20typedef=20int=20semantic_type;]],=0A-[[=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;]])])[=0A+[[=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;]])])[=0A=20#else=0A-=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;=0A+=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;=0A=20#endif=0A=20=20=20=20=20///=20=
Symbol=20locations.=0A=20=20=20=20=20typedef=20=
]b4_percent_define_get([[location_type]],=0A@@=20-262,9=20+262,9=20@@=20=
b4_user_stype=0A=20=
]b4_percent_define_flag_if([[global_tokens_and_yystype]],=0A=20=
[b4_token_defines(b4_tokens)=0A=20=0A-#ifndef=20YYSTYPE=0A+#ifndef=20=
]b4_api_PREFIX[STYPE=0A=20=20/*=20Redirection=20for=20backward=20=
compatibility.=20=20*/=0A-#=20define=20YYSTYPE=20=
b4_namespace_ref::b4_parser_class_name::semantic_type=0A+#=20define=20=
]b4_api_PREFIX[STYPE=20=
b4_namespace_ref::b4_parser_class_name::semantic_type=0A=20#endif=0A=20=
])[=0A=20]b4_percent_code_get([[provides]])[=0A@@=20-597,7=20+597,7=20@@=20=
m4_popdef([b4_at_dollar])])dnl=0A=20=20=20=20=20=20=20{=0A=20=09YYCDEBUG=20=
<<=20"Reading=20a=20token:=20";=0A=20=09yychar=20=3D=20=
]b4_c_function_call([yylex],=20[int],=0A-=09=09=09=09=20=20=20=20=20=
[[YYSTYPE*],=20[&yylval]][]dnl=0A+=09=09=09=09=20=20=20=20=20=
[b4_api_PREFIX[STYPE*],=20[&yylval]][]dnl=0A=20b4_locations_if([,=20=
[[location*],=20[&yylloc]]])dnl=0A=20m4_ifdef([b4_lex_param],=20[,=20=
]b4_lex_param))[;=0A=20=20=20=20=20=20=20}=0Adiff=20--git=20=
a/data/yacc.c=20b/data/yacc.c=0Aindex=207cf088b..8c595f9=20100644=0A---=20=
a/data/yacc.c=0A+++=20b/data/yacc.c=0A@@=20-307,7=20+307,15=20@@=20=
b4_copyright([Bison=20implementation=20for=20Yacc-like=20parsers=20in=20=
C],=0A=20=0A=20]b4_identification=0A=20b4_percent_code_get([[top]])[]dnl=0A=
-m4_if(b4_prefix,=20[yy],=20[],=0A+m4_if(b4_api_prefix,=20[yy],=20[],=0A=
+[[/*=20Substitute=20the=20type=20names.=20=20*/=0A+#define=20YYSTYPE=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[STYPE=0A+#define=20=
YYSTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=0A+#define=20=
YYSTYPE_IS_DECLARED=20=20=
]b4_api_PREFIX[STYPE_IS_DECLARED]b4_locations_if([[=0A+#define=20YYLTYPE=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[LTYPE=0A+#define=20=
YYLTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[LTYPE_IS_TRIVIAL=0A+#define=20=
YYLTYPE_IS_DECLARED=20=20]b4_api_PREFIX[LTYPE_IS_DECLARED]])])[=0A=
+]m4_if(b4_prefix,=20[yy],=20[],=0A=20[[/*=20Substitute=20the=20variable=20=
and=20function=20names.=20=20*/]b4_pull_if([[=0A=20#define=20yyparse=20=20=
=20=20=20=20=20=20=20]b4_prefix[parse]])b4_push_if([[=0A=20#define=20=
yypush_parse=20=20=20=20]b4_prefix[push_parse]b4_pull_if([[=0Adiff=20=
--git=20a/doc/bison.texi=20b/doc/bison.texi=0Aindex=20b163166..5e7206f=20=
100644=0A---=20a/doc/bison.texi=0A+++=20b/doc/bison.texi=0A@@=20-5319,6=20=
+5319,21=20@@=20Some=20of=20the=20accepted=20@var{variable}s=20are:=0A=20=
@itemize=20@bullet=0A=20@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20api.pure=0A=20@item=20api.pure=0A+@findex=20%define=20api.prefix=0A+=0A=
+@itemize=20@bullet=0A+@item=20Language(s):=20All=0A+=0A+@item=20=
Purpose:=20Rename=20exported=20symbols=0A+@xref{Multiple=20Parsers,=20=
,Multiple=20Parsers=20in=20the=20Same=20Program}.=0A+=0A+@item=20=
Accepted=20Values:=20String=0A+=0A+@item=20Default=20Value:=20@code{yy}=0A=
+@end=20itemize=0A+=0A+@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20api.pure=0A+@item=20api.pure=0A=20@findex=20%define=20api.pure=0A=20=0A=
=20@itemize=20@bullet=0A@@=20-5332,6=20+5347,8=20@@=20Some=20of=20the=20=
accepted=20@var{variable}s=20are:=0A=20@item=20Default=20Value:=20=
@code{false}=0A=20@end=20itemize=0A=20=0A+@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20api.push-pull=0A+=0A=20@item=20api.push-pull=0A=20@findex=20%define=20=
api.push-pull=0A=20=0Adiff=20--git=20a/tests/headers.at=20=
b/tests/headers.at=0Aindex=20549d62d..baf918d=20100644=0A---=20=
a/tests/headers.at=0A+++=20b/tests/headers.at=0A@@=20-117,3=20+117,91=20=
@@=20AT_COMPILE([caller],=20[caller.o=20input.o])=0A=20=
AT_PARSER_CHECK([./caller])=0A=20=0A=20AT_CLEANUP=0A+=0A+##=20=
-----------------=20##=0A+##=20Several=20parsers.=20=20##=0A+##=20=
-----------------=20##=0A+=0A+AT_SETUP([Several=20parsers])=0A+=0A+#=20=
AT_DATA_GRAMMAR_SEVERAL([PREFIX],=20[DIRECTIVES])=0A+#=20=
-----------------------------------------------=0A+#=20Generate=20and=20=
compile=20to=20*.o.=20=20Make=20sure=20there=20is=20no=20YY*=20nor=20yy*=20=
in=0A+#=20the=20header=20(but=20YYDEBUG=20and=20YYPARSE_PARAM).=0A=
+m4_define([AT_DATA_GRAMMAR_SEVERAL],=0A=
+[AT_BISON_OPTION_PUSHDEFS([%define=20api.prefix=20"$1_"=20$2])=0A=
+AT_DATA_GRAMMAR([AT_SKEL_CC_IF([$1.yy],=20[$1.y])],=0A+[[%define=20=
api.prefix=20"$1_"=0A+$2=0A+%union=0A+{=0A+=20=20int=20integer;=0A+}=0A=
+%{=0A+#include=20<stdio.h>=0A+=20=20]AT_YYERROR_DECLARE[=0A+=20=20=
]AT_YYLEX_DECLARE[=0A+%}=0A+%%=0A+exp:=0A+=20=20'x'=20'1'=20{=20printf=20=
("x1\n");=20}=0A+|=20'x'=20'2'=20{=20printf=20("x2\n");=20}=0A+|=20'x'=20=
'3'=20{=20printf=20("x3\n");=20}=0A+|=20'x'=20'4'=20{=20printf=20=
("x4\n");=20}=0A+|=20'x'=20'5'=20{=20printf=20("x5\n");=20}=0A+|=20'x'=20=
'6'=20{=20printf=20("x6\n");=20}=0A+;=0A+=0A+%%=0A+]AT_YYERROR_DEFINE[=0A=
+]AT_YYLEX_DEFINE([$1])[=0A+]])=0A+=0A+AT_BISON_CHECK([-d=20-o=20=
AT_SKEL_CC_IF([$1.cc=20$1.yy],=20[$1.c=20$1.y])])=0A+#AT_CHECK([$EGREP=20=
-i=20yy=20$1.h=20|=20$EGREP=20-v=20'YY(DEBUG|PARSE_PARAM)'],=20[1])=0A=
+AT_LANG_COMPILE([$1.o])=0A+AT_BISON_OPTION_POPDEFS=0A+])=0A+=0A=
+AT_DATA([main.cc],=0A+[[extern=20"C"=0A+{=0A+=20=20#include=20"x1.h"=0A=
+=20=20#include=20"x2.h"=0A+=20=20#include=20"x3.h"=0A+=20=20#include=20=
"x4.h"=0A+}=0A+#include=20"x5.hh"=0A+//#include=20"x6.hh"=0A+int=0A+main=20=
(void)=0A+{=0A+=20=20int=20errs=20=3D=200;=0A+=20=20errs=20+=3D=20=
x1_parse();=0A+=20=20errs=20+=3D=20x2_parse();=0A+=20=20errs=20+=3D=20=
x3_parse();=0A+=20=20errs=20+=3D=20x4_parse();=0A+=20=20x5_::parser=20=
p5;=0A+=20=20errs=20+=3D=20p5.parse();=0A+//=20=20errs=20+=3D=20=
x6_parse();=0A+=20=20return=20!!errs;=0A+}=0A+]])=0A+=0A=
+AT_DATA_GRAMMAR_SEVERAL([x1],=20[])=0A+AT_DATA_GRAMMAR_SEVERAL([x2],=20=
[%locations=20%debug])=0A+AT_DATA_GRAMMAR_SEVERAL([x3],=20[%glr-parser])=0A=
+AT_DATA_GRAMMAR_SEVERAL([x4],=20[%locations=20%debug=20%glr-parser])=0A=
+AT_DATA_GRAMMAR_SEVERAL([x5],=20[%locations=20%debug=20%language=20=
"c++"])=0A+#AT_DATA_GRAMMAR_SEVERAL([x6],=20[%locations=20%language=20=
"c++"])=0A+=0A+AT_COMPILE_CXX([parser],=20[x1.o=20x2.o=20x3.o=20x4.o=20=
x5.o=20main.cc])=0A+AT_CHECK([./parser],=20[0],=0A+[[x1=0A+x2=0A+x3=0A=
+x4=0A+x5=0A+]])=0A+=0A+AT_CLEANUP=0Adiff=20--git=20a/tests/local.at=20=
b/tests/local.at=0Aindex=205a5bbdd..7c199de=20100644=0A---=20=
a/tests/local.at=0A+++=20b/tests/local.at=0A@@=20-145,6=20+145,8=20@@=20=
m4_pushdef([AT_API_prefix],=0A=20[m4_bmatch([$3],=20[%define=20=
api\.prefix=20".*"],=0A=20=20=20=20=20=20=20=20=20=20=20=20=
[m4_bregexp([$3],=20[%define=20api\.prefix=20"\([^""]*\)"],=20[\1])],=0A=20=
=20=20=20=20=20=20=20=20=20=20=20[yy])])=0A+m4_pushdef([AT_API_PREFIX],=0A=
+[m4_toupper(AT_API_prefix)])=0A=20#=20yyerror=20receives=20the=20=
location=20if=20%location=20&=20%pure=20&=20(%glr=20or=20%parse-param).=0A=
=20m4_pushdef([AT_YYERROR_ARG_LOC_IF],=0A=20=
[AT_GLR_OR_PARAM_IF([AT_PURE_AND_LOC_IF([$1],=20[$2])],=0A@@=20-165,10=20=
+167,10=20@@=20m4_pushdef([AT_PURE_LEX_IF],=0A=20=0A=20=
m4_pushdef([AT_YYSTYPE],=0A=20=
[AT_SKEL_CC_IF([AT_NAME_PREFIX[::parser::semantic_type]],=0A-=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20[[YYSTYPE]])])=0A+=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20[AT_API_PREFIX[STYPE]])])=0A=20=
m4_pushdef([AT_YYLTYPE],=0A=20=
[AT_SKEL_CC_IF([AT_NAME_PREFIX[::parser::location_type]],=0A-=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20[[YYLTYPE]])])=0A+=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20[AT_API_PREFIX[LTYPE]])])=0A=20=0A=20=0A=20=
AT_PURE_LEX_IF(=0A@@=20-221,6=20+223,7=20@@=20m4_popdef([AT_LOC])=0A=20=
m4_popdef([AT_PURE_LEX_IF])=0A=20m4_popdef([AT_YYERROR_SEES_LOC_IF])=0A=20=
m4_popdef([AT_YYERROR_ARG_LOC_IF])=0A+m4_popdef([AT_API_PREFIX])=0A=20=
m4_popdef([AT_API_prefix])=0A=20m4_popdef([AT_NAME_PREFIX])=0A=20=
m4_popdef([AT_GLR_OR_PARAM_IF])=0A--=20=0A1.7.11.1=0A=0A=

--Apple-Mail=_C116733C-DF7D-4C28-B9A6-75C9D67D68C3
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=iso-8859-1




--Apple-Mail=_C116733C-DF7D-4C28-B9A6-75C9D67D68C3--


From MAILER-DAEMON Fri Jun 29 11:43:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SkdLY-0008Gq-Ip
	for mharc-bug-bison@gnu.org; Fri, 29 Jun 2012 11:43:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42462)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SkdLR-0008GW-6z
	for bug-bison@gnu.org; Fri, 29 Jun 2012 11:42:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>) id 1SkdLP-0008Ht-FT
	for bug-bison@gnu.org; Fri, 29 Jun 2012 11:42:52 -0400
Received: from sao-paulo.lrde.epita.fr ([163.5.55.1]:40696
	helo=kualalumpur.lrde.epita.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SkdLP-0008HA-08; Fri, 29 Jun 2012 11:42:51 -0400
Received: from erebus.lrde.epita.fr ([192.168.101.165])
	by kualalumpur.lrde.epita.fr with esmtpsa
	(TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63)
	(envelope-from <akim@lrde.epita.fr>)
	id 1SkdLL-0001Mt-F9; Fri, 29 Jun 2012 17:42:47 +0200
Subject: Re: yacc.c does not prototype yyparse in the header
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: multipart/mixed;
	boundary="Apple-Mail=_7685FED1-3B79-4197-8636-5504E12B2096"
From: Akim Demaille <akim@lrde.epita.fr>
In-Reply-To: <F8390949-E9DA-4632-8C04-A087D7E76757@lrde.epita.fr>
Date: Fri, 29 Jun 2012 17:42:47 +0200
Message-Id: <F9C11FC5-D73F-4D12-94B0-DA8001E89180@lrde.epita.fr>
References: <80AD8426-5BCA-4A0A-9529-EF786DC48AC9@lrde.epita.fr>
	<4FCFCDA2.9080206@gnu.org>
	<9733E760-8220-445A-8AB9-D7A19247A805@lrde.epita.fr>
	<4FD236E7.6080609@gnu.org>
	<554D01B6-ABD2-4998-A40F-6B13793DBF72@lrde.epita.fr>
	<4FD5BA89.0@cs.ucla.edu>
	<59EB43E0-4486-4258-A37F-3D91415F51EA@lrde.epita.fr>
	<4FD77125.2070807@cs.ucla.edu>
	<AE9C526A-D5C4-4AAB-80F2-7D12BF1A4C86@lrde.epita.fr>
	<4FD8C479.6030703@cs.ucla.edu>
	<F8390949-E9DA-4632-8C04-A087D7E76757@lrde.epita.fr>
To: Paul Eggert <eggert@cs.ucla.edu>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 163.5.55.1
Cc: Bison Bugs <bug-bison@gnu.org>, Bruce Korb <bkorb@gnu.org>,
	Bison Patches <bison-patches@gnu.org>
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for Bison, the GNU parser generator" <bug-bison.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-bison>
List-Post: <mailto:bug-bison@gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Jun 2012 15:42:59 -0000


--Apple-Mail=_7685FED1-3B79-4197-8636-5504E12B2096
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=iso-8859-1


Le 28 juin 2012 =E0 11:45, Akim Demaille a =E9crit :

> Le 13 juin 2012 =E0 18:48, Paul Eggert a =E9crit :
>=20
>> On 06/13/2012 12:03 AM, Akim Demaille wrote:
>>> Another, completely different, course of action would be
>>> to deprecate %name-prefix and leave it as is, and promote
>>> something like
>>>=20
>>> %define api.prefix "foo"
>>>=20
>>> which, this time, would also cover the types.
>>=20
>> Yes, thanks, this sounds better to me too.
>=20
> This is an initial patch.  I think the code part is mature,
> but there remains to document this more thoroughly.  I would
> certainly appreciate comments :)

This is a more mature patch, with the documentation.
It's in the api.prefix branch.


--Apple-Mail=_7685FED1-3B79-4197-8636-5504E12B2096
Content-Disposition: attachment;
	filename=0001-api.prefix.patch
Content-Type: application/octet-stream;
	name="0001-api.prefix.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=204b3847c3c0e161b85267d077adb256a880c0f3e3=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20Akim=20Demaille=20<akim@lrde.epita.fr>=0ADate:=20=
Tue,=2026=20Jun=202012=2010:09:10=20+0200=0ASubject:=20[PATCH]=20=
api.prefix.=0A=0A*=20data/c.m4=20(b4_api_prefix,=20b4_api_PREFIX):=20=
New.=0A(b4_prefix,=20b4_union_name,=20b4_token_enums,=20=
b4_declare_yylstype):=20Use=20them.=0A*=20data/glr.c,=20data/yacc.c,=20=
data/glr.cc,=20data/lalr1.cc:=20Use=20them=20to=20change=0Athe=20prefix=20=
of=20exported=20preprocessor=20symbols.=0A*=20src/getargs.c=20(usage):=20=
Ditto.=0A*=20tests/headers.at=20(Several=20parsers):=20New.=0A*=20=
tests/local.at=20(AT_API_PREFIX):=20New.=0AAT_YYSTYPE,=20AT_YYLTYPE):=20=
Adjust.=0A*=20doc/bison.texi=20(Multiple=20Parsers):=20Move=20=
documentation=20of=20%name-prefix=20to...=0A(Table=20of=20Symbols):=20=
here.=0A(Multiple=20Parsers):=20Document=20api.prefix.=0A(%define=20=
Summary):=20Point=20to=20it.=0AUse=20@code=20for=20variable=20names.=0A=
(Bison=20Options):=20-p/--name-prefix=20are=20obsoleted.=0A*=20NEWS:=20=
Announce=20api.prefix.=0A---=0A=20NEWS=20=20=20=20=20=20=20=20=20=20=20=20=
=20|=20=2054=20+++++++++++++++++++=0A=20data/c.m4=20=20=20=20=20=20=20=20=
|=20=2065=20+++++++++++++----------=0A=20data/glr.c=20=20=20=20=20=20=20=
|=20=20=208=20+++=0A=20data/glr.cc=20=20=20=20=20=20|=20=2014=20++---=0A=20=
data/lalr1.cc=20=20=20=20|=20=2012=20++---=0A=20data/yacc.c=20=20=20=20=20=
=20|=20=2010=20+++-=0A=20doc/bison.texi=20=20=20|=20155=20=
++++++++++++++++++++++++++++++++++++-------------------=0A=20=
src/getargs.c=20=20=20=20|=20=20=207=20+--=0A=20tests/headers.at=20|=20=20=
90=20++++++++++++++++++++++++++++++++=0A=20tests/local.at=20=20=20|=20=20=
=207=20++-=0A=2010=20files=20changed,=20323=20insertions(+),=2099=20=
deletions(-)=0A=0Adiff=20--git=20a/NEWS=20b/NEWS=0Aindex=20=
33fac14..371b933=20100644=0A---=20a/NEWS=0A+++=20b/NEWS=0A@@=20-70,6=20=
+70,60=20@@=20GNU=20Bison=20NEWS=0A=20=20=20For=20the=20same=20reasons,=20=
the=20undocumented=20and=20unused=20macro=20YYLSP_NEEDED=20is=20no=0A=20=20=
=20longer=20defined.=0A=20=0A+**=20New=20%define=20variable:=20=
api.prefix=0A+=0A+=20=20Now=20that=20the=20generated=20headers=20are=20=
more=20complete=20and=20properly=20protected=0A+=20=20against=20multiple=20=
inclusions,=20constant=20names,=20such=20as=20YYSTYPE=20are=20a=0A+=20=20=
problem.=20=20While=20yyparse=20and=20others=20are=20properly=20renamed=20=
by=20%name-prefix,=0A+=20=20YYSTYPE,=20YYDEBUG=20and=20others=20have=20=
never=20been=20affected=20by=20it.=20=20Because=20it=0A+=20=20would=20=
introduce=20backward=20compatibility=20issues=20in=20projects=20not=20=
expecting=0A+=20=20YYSTYPE=20to=20be=20renamed,=20instead=20of=20=
changing=20the=20behavior=20of=20%name-prefix,=0A+=20=20it=20is=20=
deprecated=20in=20favor=20of=20a=20new=20%define=20variable:=20=
api.prefix.=0A+=0A+=20=20The=20following=20examples=20compares=20both:=0A=
+=0A+=20=20=20=20%name-prefix=20"bar_"=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20|=20%define=20api.prefix=20"bar_"=0A+=20=20=20=20%token=20=
<ival>=20FOO=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
%token=20<ival>=20FOO=0A+=20=20=20=20%union=20{=20int=20ival;=20}=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20%union=20{=20int=20ival;=20}=0A+=20=
=20=20=20%%=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20%%=0A+=20=20=20=20exp:=20'a';=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
exp:=20'a';=0A+=0A+=20=20bison=20generates:=0A+=0A+=20=20=20=20#ifndef=20=
BAR_FOO_H=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
#ifndef=20BAR_FOO_H=0A+=20=20=20=20#=20define=20BAR_FOO_H=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20#=20define=20BAR_FOO_H=0A+=0A+=20=20=20=
=20/*=20Enabling=20traces.=20=20*/=20=20=20=20=20=20=20=20=20=20=20=20=20=
/*=20Enabling=20traces.=20=20*/=0A+=20=20=20=20#=20ifndef=20YYDEBUG=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#=20ifndef=20=
YYDEBUG=0A+=20=20=20=20#=20=20define=20YYDEBUG=200=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20#=20=20define=20YYDEBUG=200=0A+=20=20=20=20#=20=
endif=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20#=20endif=0A+=20=20=20=20#=20if=20YYDEBUG=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#=20if=20=
YYDEBUG=0A+=20=20=20=20extern=20int=20bar_debug;=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20extern=20int=20bar_debug;=0A+=20=20=20=20#=20endif=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20#=20endif=0A+=0A+=20=20=20=20/*=20Tokens.=20=20*/=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20/*=20Tokens.=20=20*/=0A+=20=
=20=20=20#=20ifndef=20YYTOKENTYPE=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
|=20#=20ifndef=20BAR_TOKENTYPE=0A+=20=20=20=20#=20=20define=20=
YYTOKENTYPE=20=20=20=20=20=20=20=20=20=20=20=20=20|=20#=20=20define=20=
BAR_TOKENTYPE=0A+=20=20=20=20=20=20=20enum=20yytokentype=20{=20=20=20=20=20=
=20=20=20=20=20=20=20=20|=20=20=20=20enum=20bar_tokentype=20{=0A+=20=20=20=
=20=20=20=20=20=20FOO=20=3D=20258=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20FOO=20=3D=20258=0A+=20=20=20=20=20=
=20=20};=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20};=0A+=20=20=20=20#=20endif=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
#=20endif=0A+=0A+=20=20=20=20#if=20!=20defined=20YYSTYPE=20\=20=20=20=20=20=
=20=20=20=20=20=20|=20#if=20!=20defined=20BAR_STYPE=20\=0A+=20=20=20=20=20=
&&=20!=20defined=20YYSTYPE_IS_DECLARED=20|=20=20&&=20!=20defined=20=
BAR_STYPE_IS_DECLARED=0A+=20=20=20=20typedef=20union=20YYSTYPE=20=20=20=20=
=20=20=20=20=20=20=20=20=20|=20typedef=20union=20BAR_STYPE=0A+=20=20=20=20=
{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20{=0A+=20=20=20=20=20int=20ival;=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
int=20ival;=0A+=20=20=20=20}=20YYSTYPE;=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20|=20}=20BAR_STYPE;=0A+=20=20=20=20#=20=
define=20YYSTYPE_IS_DECLARED=201=20=20=20=20|=20#=20define=20=
BAR_STYPE_IS_DECLARED=201=0A+=20=20=20=20#endif=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#endif=0A=
+=0A+=20=20=20=20extern=20YYSTYPE=20bar_lval;=20=20=20=20=20=20=20=20=20=20=
|=20extern=20BAR_STYPE=20bar_lval;=0A+=0A+=20=20=20=20int=20bar_parse=20=
(void);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20int=20bar_parse=20=
(void);=0A+=0A+=20=20=20=20#endif=20/*=20!BAR_FOO_H=20=20*/=20=20=20=20=20=
=20=20=20=20=20=20=20#endif=20/*=20!BAR_FOO_H=20=20*/=0A+=0A=20*=20=
Noteworthy=20changes=20in=20release=202.5.1=20(2012-06-05)=20[stable]=0A=20=
=0A=20**=20Future=20changes:=0Adiff=20--git=20a/data/c.m4=20b/data/c.m4=0A=
index=201f266a4..0b2699a=20100644=0A---=20a/data/c.m4=0A+++=20=
b/data/c.m4=0A@@=20-84,11=20+84,24=20@@=20m4_define([b4_identification],=0A=
=20##=20Default=20values.=20=20##=0A=20##=20----------------=20##=0A=20=0A=
+#=20b4_api_prefix,=20b4_api_PREFIX=0A+#=20----------------------------=0A=
+#=20Corresponds=20to=20%define=20api.prefix=0A=
+b4_percent_define_default([[api.prefix]],=20[[yy]])=0A=
+m4_define([b4_api_prefix],=0A+[b4_percent_define_get([[api.prefix]])])=0A=
+m4_define([b4_api_PREFIX],=0A+[m4_toupper(b4_api_prefix)])=0A+=0A+=0A+#=20=
b4_prefix=0A+#=20---------=0A+#=20If=20the=20%name-prefix=20is=20not=20=
given,=20it=20is=20api.prefix.=0A+m4_define_default([b4_prefix],=20=
[b4_api_prefix])=0A+=0A=20#=20If=20the=20%union=20is=20not=20named,=20=
its=20name=20is=20YYSTYPE.=0A-m4_define_default([b4_union_name],=20=
[YYSTYPE])=0A+m4_define_default([b4_union_name],=20=
[b4_api_PREFIX[]STYPE])=0A=20=0A-#=20If=20the=20%name-prefix=20is=20not=20=
given,=20it=20is=20yy.=0A-m4_define_default([b4_prefix],=20[yy])=0A=20=0A=
=20##=20------------------------=20##=0A=20##=20Pure/impure=20=
interfaces.=20=20##=0A@@=20-232,18=20+245,18=20@@=20=
m4_define([b4_token_enum],=0A=20#=20Output=20the=20definition=20of=20the=20=
tokens=20(if=20there=20are)=20as=20enums.=0A=20=
m4_define([b4_token_enums],=0A=20[m4_if([$#$1],=20[1],=20[],=0A-[/*=20=
Tokens.=20=20*/=0A-#ifndef=20YYTOKENTYPE=0A-#=20define=20YYTOKENTYPE=0A=
+[[/*=20Tokens.=20=20*/=0A+#ifndef=20]b4_api_PREFIX[TOKENTYPE=0A+#=20=
define=20]b4_api_PREFIX[TOKENTYPE=0A=20=20=20=20/*=20Put=20the=20tokens=20=
into=20the=20symbol=20table,=20so=20that=20GDB=20and=20other=20debuggers=0A=
=20=20=20=20=20=20=20know=20about=20them.=20=20*/=0A-=20=20=20enum=20=
yytokentype=20{=0A-m4_map_sep([=20=20=20=20=20b4_token_enum],=20[,=0A+=20=
=20=20enum=20]b4_api_prefix[tokentype=20{=0A+]m4_map_sep([=20=20=20=20=20=
b4_token_enum],=20[,=0A=20],=0A-=09=20=20=20[$@])=0A+=09=20=20=20[$@])[=0A=
=20=20=20=20};=0A=20#endif=0A-])])=0A+]])])=0A=20=0A=20=0A=20#=20=
b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)=0A@@=20=
-533,39=20+546,39=20@@=20b4_locations_if([,=20=
yylocationp])[]b4_user_args[);=0A=20##=20--------------=20##=0A=20=0A=20=
#=20b4_declare_yylstype=0A-#=20------------------=0A+#=20=
-------------------=0A=20#=20Declarations=20that=20might=20either=20go=20=
into=20the=20header=20(if=20--defines)=20or=0A=20#=20in=20the=20parser=20=
body.=20=20Declare=20YYSTYPE/YYLTYPE,=20and=20yylval/yylloc.=0A=20=
m4_define([b4_declare_yylstype],=0A-[[#if=20!=20defined=20YYSTYPE=20&&=20=
!=20defined=20YYSTYPE_IS_DECLARED=0A+[[#if=20!=20defined=20=
]b4_api_PREFIX[STYPE=20&&=20!=20defined=20=
]b4_api_PREFIX[STYPE_IS_DECLARED=0A=20]m4_ifdef([b4_stype],=0A=20=
[[typedef=20union=20]b4_union_name[=0A=20{=0A=20]b4_user_stype[=0A-}=20=
YYSTYPE;=0A-#=20define=20YYSTYPE_IS_TRIVIAL=201]],=0A+}=20=
]b4_api_PREFIX[STYPE;=0A+#=20define=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=20=
1]],=0A=20[m4_if(b4_tag_seen_flag,=200,=0A-[[typedef=20int=20YYSTYPE;=0A=
-#=20define=20YYSTYPE_IS_TRIVIAL=201]])])[=0A-#=20define=20yystype=20=
YYSTYPE=20/*=20obsolescent;=20will=20be=20withdrawn=20*/=0A-#=20define=20=
YYSTYPE_IS_DECLARED=201=0A+[[typedef=20int=20]b4_api_PREFIX[STYPE;=0A+#=20=
define=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=201]])])[=0A+#=20define=20=
]b4_api_prefix[stype=20]b4_api_PREFIX[STYPE=20/*=20obsolescent;=20will=20=
be=20withdrawn=20*/=0A+#=20define=20]b4_api_PREFIX[STYPE_IS_DECLARED=201=0A=
=20#endif]b4_locations_if([[=0A=20=0A-#if=20!=20defined=20YYLTYPE=20&&=20=
!=20defined=20YYLTYPE_IS_DECLARED=0A-typedef=20struct=20YYLTYPE=0A+#if=20=
!=20defined=20]b4_api_PREFIX[LTYPE=20&&=20!=20defined=20=
]b4_api_PREFIX[LTYPE_IS_DECLARED=0A+typedef=20struct=20=
]b4_api_PREFIX[LTYPE=0A=20{=0A=20=20=20int=20first_line;=0A=20=20=20int=20=
first_column;=0A=20=20=20int=20last_line;=0A=20=20=20int=20last_column;=0A=
-}=20YYLTYPE;=0A-#=20define=20yyltype=20YYLTYPE=20/*=20obsolescent;=20=
will=20be=20withdrawn=20*/=0A-#=20define=20YYLTYPE_IS_DECLARED=201=0A-#=20=
define=20YYLTYPE_IS_TRIVIAL=201=0A+}=20]b4_api_PREFIX[LTYPE;=0A+#=20=
define=20]b4_api_prefix[ltype=20]b4_api_PREFIX[LTYPE=20/*=20obsolescent;=20=
will=20be=20withdrawn=20*/=0A+#=20define=20=
]b4_api_PREFIX[LTYPE_IS_DECLARED=201=0A+#=20define=20=
]b4_api_PREFIX[LTYPE_IS_TRIVIAL=201=0A=20#endif]])=0A=20=0A=
-b4_pure_if([],=20[[extern=20YYSTYPE=20]b4_prefix[lval;=0A=
-]b4_locations_if([[extern=20YYLTYPE=20]b4_prefix[lloc;]])])[]dnl=0A=
+b4_pure_if([],=20[[extern=20]b4_api_PREFIX[STYPE=20]b4_prefix[lval;=0A=
+]b4_locations_if([[extern=20]b4_api_PREFIX[LTYPE=20=
]b4_prefix[lloc;]])])[]dnl=0A=20])=0A=20=0A=20#=20b4_declare_yydebug=0A=
diff=20--git=20a/data/glr.c=20b/data/glr.c=0Aindex=20699d730..ce61160=20=
100644=0A---=20a/data/glr.c=0A+++=20b/data/glr.c=0A@@=20-188,6=20+188,14=20=
@@=20b4_copyright([Skeleton=20implementation=20for=20Bison=20GLR=20=
parsers=20in=20C],=0A=20]b4_identification=0A=20=0A=20=
b4_percent_code_get([[top]])[=0A+]m4_if(b4_api_prefix,=20[yy],=20[],=0A=
+[[/*=20Substitute=20the=20type=20names.=20=20*/=0A+#define=20YYSTYPE=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[STYPE=0A+#define=20=
YYSTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=0A+#define=20=
YYSTYPE_IS_DECLARED=20=20=
]b4_api_PREFIX[STYPE_IS_DECLARED]b4_locations_if([[=0A+#define=20YYLTYPE=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[LTYPE=0A+#define=20=
YYLTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[LTYPE_IS_TRIVIAL=0A+#define=20=
YYLTYPE_IS_DECLARED=20=20]b4_api_PREFIX[LTYPE_IS_DECLARED]])])[=0A=20=
]m4_if(b4_prefix,=20[yy],=20[],=0A=20[[/*=20Substitute=20the=20variable=20=
and=20function=20names.=20=20*/=0A=20#define=20yyparse=20=
]b4_prefix[parse=0Adiff=20--git=20a/data/glr.cc=20b/data/glr.cc=0Aindex=20=
8e46be3..d1eb6bd=20100644=0A---=20a/data/glr.cc=0A+++=20b/data/glr.cc=0A=
@@=20-269,7=20+269,7=20@@=20b4_copyright([Skeleton=20interface=20for=20=
Bison=20GLR=20parsers=20in=20C++],=0A=20=20=20{=0A=20=20=20public:=0A=20=20=
=20=20=20///=20Symbol=20semantic=20values.=0A-#ifndef=20YYSTYPE=0A=
+#ifndef=20]b4_api_PREFIX[STYPE=0A=20]m4_ifdef([b4_stype],=0A=20[=20=20=20=
=20union=20semantic_type=0A=20=20=20=20=20{=0A@@=20-277,9=20+277,9=20@@=20=
b4_user_stype=0A=20=20=20=20=20};],=0A=20[m4_if(b4_tag_seen_flag,=200,=0A=
=20[[=20=20=20=20typedef=20int=20semantic_type;]],=0A-[[=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;]])])[=0A+[[=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;]])])[=0A=20#else=0A-=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;=0A+=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;=0A=20#endif=0A=20=20=20=20=20///=20=
Symbol=20locations.=0A=20=20=20=20=20typedef=20=
]b4_percent_define_get([[location_type]],=0A@@=20-350,11=20+350,11=20@@=20=
b4_user_stype=0A=20=
b4_percent_define_flag_if([[global_tokens_and_yystype]],=0A=20=
[b4_token_defines(b4_tokens)])=0A=20[=0A-#ifndef=20YYSTYPE=0A-#=20define=20=
YYSTYPE=20]b4_namespace_ref[::]b4_parser_class_name[::semantic_type=0A=
+#ifndef=20]b4_api_PREFIX[STYPE=0A+#=20define=20]b4_api_PREFIX[STYPE=20=
]b4_namespace_ref[::]b4_parser_class_name[::semantic_type=0A=20#endif=0A=
-#ifndef=20YYLTYPE=0A-#=20define=20YYLTYPE=20=
]b4_namespace_ref[::]b4_parser_class_name[::location_type=0A+#ifndef=20=
]b4_api_PREFIX[LTYPE=0A+#=20define=20]b4_api_PREFIX[LTYPE=20=
]b4_namespace_ref[::]b4_parser_class_name[::location_type=0A=20#endif=0A=20=
=0A=20]b4_namespace_close[=0Adiff=20--git=20a/data/lalr1.cc=20=
b/data/lalr1.cc=0Aindex=20e82e654..337af10=20100644=0A---=20=
a/data/lalr1.cc=0A+++=20b/data/lalr1.cc=0A@@=20-69,7=20+69,7=20@@=20=
b4_copyright([Skeleton=20interface=20for=20Bison=20LALR(1)=20parsers=20=
in=20C++],=0A=20=20=20{=0A=20=20=20public:=0A=20=20=20=20=20///=20Symbol=20=
semantic=20values.=0A-#ifndef=20YYSTYPE=0A+#ifndef=20=
]b4_api_PREFIX[STYPE=0A=20]m4_ifdef([b4_stype],=0A=20[=20=20=20=20union=20=
semantic_type=0A=20=20=20=20=20{=0A@@=20-77,9=20+77,9=20@@=20=
b4_user_stype=0A=20=20=20=20=20};],=0A=20[m4_if(b4_tag_seen_flag,=200,=0A=
=20[[=20=20=20=20typedef=20int=20semantic_type;]],=0A-[[=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;]])])[=0A+[[=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;]])])[=0A=20#else=0A-=20=20=20=20=
typedef=20YYSTYPE=20semantic_type;=0A+=20=20=20=20typedef=20=
]b4_api_PREFIX[STYPE=20semantic_type;=0A=20#endif=0A=20=20=20=20=20///=20=
Symbol=20locations.=0A=20=20=20=20=20typedef=20=
]b4_percent_define_get([[location_type]],=0A@@=20-262,9=20+262,9=20@@=20=
b4_user_stype=0A=20=
]b4_percent_define_flag_if([[global_tokens_and_yystype]],=0A=20=
[b4_token_defines(b4_tokens)=0A=20=0A-#ifndef=20YYSTYPE=0A+#ifndef=20=
]b4_api_PREFIX[STYPE=0A=20=20/*=20Redirection=20for=20backward=20=
compatibility.=20=20*/=0A-#=20define=20YYSTYPE=20=
b4_namespace_ref::b4_parser_class_name::semantic_type=0A+#=20define=20=
]b4_api_PREFIX[STYPE=20=
b4_namespace_ref::b4_parser_class_name::semantic_type=0A=20#endif=0A=20=
])[=0A=20]b4_percent_code_get([[provides]])[=0A@@=20-597,7=20+597,7=20@@=20=
m4_popdef([b4_at_dollar])])dnl=0A=20=20=20=20=20=20=20{=0A=20=09YYCDEBUG=20=
<<=20"Reading=20a=20token:=20";=0A=20=09yychar=20=3D=20=
]b4_c_function_call([yylex],=20[int],=0A-=09=09=09=09=20=20=20=20=20=
[[YYSTYPE*],=20[&yylval]][]dnl=0A+=09=09=09=09=20=20=20=20=20=
[b4_api_PREFIX[STYPE*],=20[&yylval]][]dnl=0A=20b4_locations_if([,=20=
[[location*],=20[&yylloc]]])dnl=0A=20m4_ifdef([b4_lex_param],=20[,=20=
]b4_lex_param))[;=0A=20=20=20=20=20=20=20}=0Adiff=20--git=20=
a/data/yacc.c=20b/data/yacc.c=0Aindex=207cf088b..8c595f9=20100644=0A---=20=
a/data/yacc.c=0A+++=20b/data/yacc.c=0A@@=20-307,7=20+307,15=20@@=20=
b4_copyright([Bison=20implementation=20for=20Yacc-like=20parsers=20in=20=
C],=0A=20=0A=20]b4_identification=0A=20b4_percent_code_get([[top]])[]dnl=0A=
-m4_if(b4_prefix,=20[yy],=20[],=0A+m4_if(b4_api_prefix,=20[yy],=20[],=0A=
+[[/*=20Substitute=20the=20type=20names.=20=20*/=0A+#define=20YYSTYPE=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[STYPE=0A+#define=20=
YYSTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[STYPE_IS_TRIVIAL=0A+#define=20=
YYSTYPE_IS_DECLARED=20=20=
]b4_api_PREFIX[STYPE_IS_DECLARED]b4_locations_if([[=0A+#define=20YYLTYPE=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20]b4_api_PREFIX[LTYPE=0A+#define=20=
YYLTYPE_IS_TRIVIAL=20=20=20]b4_api_PREFIX[LTYPE_IS_TRIVIAL=0A+#define=20=
YYLTYPE_IS_DECLARED=20=20]b4_api_PREFIX[LTYPE_IS_DECLARED]])])[=0A=
+]m4_if(b4_prefix,=20[yy],=20[],=0A=20[[/*=20Substitute=20the=20variable=20=
and=20function=20names.=20=20*/]b4_pull_if([[=0A=20#define=20yyparse=20=20=
=20=20=20=20=20=20=20]b4_prefix[parse]])b4_push_if([[=0A=20#define=20=
yypush_parse=20=20=20=20]b4_prefix[push_parse]b4_pull_if([[=0Adiff=20=
--git=20a/doc/bison.texi=20b/doc/bison.texi=0Aindex=20b163166..fbe780c=20=
100644=0A---=20a/doc/bison.texi=0A+++=20b/doc/bison.texi=0A@@=20-5154,22=20=
+5154,6=20@@=20grammar=20does=20not=20use=20it,=20using=20=
@samp{%locations}=20allows=20for=20more=0A=20accurate=20syntax=20error=20=
messages.=0A=20@end=20deffn=0A=20=0A-@deffn=20{Directive}=20%name-prefix=20=
"@var{prefix}"=0A-Rename=20the=20external=20symbols=20used=20in=20the=20=
parser=20so=20that=20they=20start=20with=0A-@var{prefix}=20instead=20of=20=
@samp{yy}.=20=20The=20precise=20list=20of=20symbols=20renamed=0A-in=20C=20=
parsers=0A-is=20@code{yyparse},=20@code{yylex},=20@code{yyerror},=20=
@code{yynerrs},=0A-@code{yylval},=20@code{yychar},=20@code{yydebug},=20=
and=0A-(if=20locations=20are=20used)=20@code{yylloc}.=20=20If=20you=20=
use=20a=20push=20parser,=0A-@code{yypush_parse},=20@code{yypull_parse},=20=
@code{yypstate},=0A-@code{yypstate_new}=20and=20@code{yypstate_delete}=20=
will=0A-also=20be=20renamed.=20=20For=20example,=20if=20you=20use=20=
@samp{%name-prefix=20"c_"},=20the=0A-names=20become=20@code{c_parse},=20=
@code{c_lex},=20and=20so=20on.=0A-For=20C++=20parsers,=20see=20the=20=
@code{%define=20namespace}=20documentation=20in=20this=0A-section.=0A=
-@xref{Multiple=20Parsers,=20,Multiple=20Parsers=20in=20the=20Same=20=
Program}.=0A-@end=20deffn=0A-=0A=20@ifset=20defaultprec=0A=20@deffn=20=
{Directive}=20%no-default-prec=0A=20Do=20not=20assign=20a=20precedence=20=
to=20rules=20lacking=20an=20explicit=20@code{%prec}=0A@@=20-5317,8=20=
+5301,23=20@@=20Unaccepted=20@var{variable}s=20produce=20an=20error.=0A=20=
Some=20of=20the=20accepted=20@var{variable}s=20are:=0A=20=0A=20@itemize=20=
@bullet=0A+@c=20=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=20api.prefix=0A+@item=20@code{api.prefix}=0A+@findex=20=
%define=20api.prefix=0A+=0A+@itemize=20@bullet=0A+@item=20Language(s):=20=
All=0A+=0A+@item=20Purpose:=20Rename=20exported=20symbols=0A=
+@xref{Multiple=20Parsers,=20,Multiple=20Parsers=20in=20the=20Same=20=
Program}.=0A+=0A+@item=20Accepted=20Values:=20String=0A+=0A+@item=20=
Default=20Value:=20@code{yy}=0A+@end=20itemize=0A+=0A=20@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20api.pure=0A-@item=20api.pure=0A+@item=20@code{api.pure}=0A=20@findex=20=
%define=20api.pure=0A=20=0A=20@itemize=20@bullet=0A@@=20-5332,7=20=
+5331,9=20@@=20Some=20of=20the=20accepted=20@var{variable}s=20are:=0A=20=
@item=20Default=20Value:=20@code{false}=0A=20@end=20itemize=0A=20=0A=
-@item=20api.push-pull=0A+@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20api.push-pull=0A+=0A+@item=20@code{api.push-pull}=0A=20@findex=20=
%define=20api.push-pull=0A=20=0A=20@itemize=20@bullet=0A@@=20-5350,7=20=
+5351,7=20@@=20More=20user=20feedback=20will=20help=20to=20stabilize=20=
it.)=0A=20=0A=20@c=20=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=20lr.default-reductions=0A=20=0A-@item=20=
lr.default-reductions=0A+@item=20@code{lr.default-reductions}=0A=20=
@findex=20%define=20lr.default-reductions=0A=20=0A=20@itemize=20@bullet=0A=
@@=20-5371,7=20+5372,7=20@@=20feedback=20will=20help=20to=20stabilize=20=
it.)=0A=20=0A=20@c=20=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=20lr.keep-unreachable-states=0A=20=0A-@item=20=
lr.keep-unreachable-states=0A+@item=20@code{lr.keep-unreachable-states}=0A=
=20@findex=20%define=20lr.keep-unreachable-states=0A=20=0A=20@itemize=20=
@bullet=0A@@=20-5384,7=20+5385,7=20@@=20remain=20in=20the=20parser=20=
tables.=20=20@xref{Unreachable=20States}.=0A=20=0A=20@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20lr.type=0A=20=0A-@item=20lr.type=0A+@item=20@code{lr.type}=0A=20=
@findex=20%define=20lr.type=0A=20=0A=20@itemize=20@bullet=0A@@=20-5399,7=20=
+5400,9=20@@=20More=20user=20feedback=20will=20help=20to=20stabilize=20=
it.)=0A=20@item=20Default=20Value:=20@code{lalr}=0A=20@end=20itemize=0A=20=
=0A-@item=20namespace=0A+@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20namespace=0A+=0A+@item=20@code{namespace}=0A=20@findex=20%define=20=
namespace=0A=20=0A=20@itemize=0A@@=20-5452,7=20+5455,7=20@@=20The=20=
parser=20namespace=20is=20@code{foo}=20and=20@code{yylex}=20is=20=
referenced=20as=0A=20@end=20itemize=0A=20=0A=20@c=20=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=20parse.lac=0A-@item=20parse.lac=0A+@item=20@code{parse.lac}=0A=20=
@findex=20%define=20parse.lac=0A=20=0A=20@itemize=0A@@=20-5585,34=20=
+5588,62=20@@=20of=20the=20standard=20Bison=20skeletons.=0A=20@section=20=
Multiple=20Parsers=20in=20the=20Same=20Program=0A=20=0A=20Most=20=
programs=20that=20use=20Bison=20parse=20only=20one=20language=20and=20=
therefore=20contain=0A-only=20one=20Bison=20parser.=20=20But=20what=20if=20=
you=20want=20to=20parse=20more=20than=20one=0A-language=20with=20the=20=
same=20program?=20=20Then=20you=20need=20to=20avoid=20a=20name=20=
conflict=0A-between=20different=20definitions=20of=20@code{yyparse},=20=
@code{yylval},=20and=20so=20on.=0A-=0A-The=20easy=20way=20to=20do=20this=20=
is=20to=20use=20the=20option=20@samp{-p=20@var{prefix}}=0A=
-(@pxref{Invocation,=20,Invoking=20Bison}).=20=20This=20renames=20the=20=
interface=0A-functions=20and=20variables=20of=20the=20Bison=20parser=20=
to=20start=20with=20@var{prefix}=0A-instead=20of=20@samp{yy}.=20=20You=20=
can=20use=20this=20to=20give=20each=20parser=20distinct=0A-names=20that=20=
do=20not=20conflict.=0A-=0A-The=20precise=20list=20of=20symbols=20=
renamed=20is=20@code{yyparse},=20@code{yylex},=0A-@code{yyerror},=20=
@code{yynerrs},=20@code{yylval},=20@code{yylloc},=0A-@code{yychar}=20and=20=
@code{yydebug}.=20=20If=20you=20use=20a=20push=20parser,=0A=
-@code{yypush_parse},=20@code{yypull_parse},=20@code{yypstate},=0A=
-@code{yypstate_new}=20and=20@code{yypstate_delete}=20will=20also=20be=20=
renamed.=0A-For=20example,=20if=20you=20use=20@samp{-p=20c},=20the=20=
names=20become=20@code{cparse},=0A-@code{clex},=20and=20so=20on.=0A-=0A=
-@strong{All=20the=20other=20variables=20and=20macros=20associated=20=
with=20Bison=20are=20not=0A-renamed.}=20These=20others=20are=20not=20=
global;=20there=20is=20no=20conflict=20if=20the=20same=0A-name=20is=20=
used=20in=20different=20parsers.=20=20For=20example,=20@code{YYSTYPE}=20=
is=20not=0A-renamed,=20but=20defining=20this=20in=20different=20ways=20=
in=20different=20parsers=20causes=0A-no=20trouble=20(@pxref{Value=20=
Type,=20,Data=20Types=20of=20Semantic=20Values}).=0A-=0A-The=20@samp{-p}=20=
option=20works=20by=20adding=20macro=20definitions=20to=20the=0A=
-beginning=20of=20the=20parser=20implementation=20file,=20defining=20=
@code{yyparse}=0A-as=20@code{@var{prefix}parse},=20and=20so=20on.=20=20=
This=20effectively=20substitutes=0A-one=20name=20for=20the=20other=20in=20=
the=20entire=20parser=20implementation=20file.=0A+only=20one=20Bison=20=
parser.=20=20But=20what=20if=20you=20want=20to=20parse=20more=20than=20=
one=20language=0A+with=20the=20same=20program?=20=20Then=20you=20need=20=
to=20avoid=20name=20conflicts=20between=0A+different=20definitions=20of=20=
functions=20and=20variables=20such=20as=20@code{yyparse},=0A=
+@code{yylval}.=20=20To=20use=20different=20parsers=20from=20the=20same=20=
compilation=20unit,=20you=0A+also=20need=20to=20avoid=20conflicts=20on=20=
types=20and=20macros=20(e.g.,=20@code{YYSTYPE})=0A+exported=20in=20the=20=
generated=20header.=0A+=0A+The=20easy=20way=20to=20do=20this=20is=20to=20=
define=20the=20@code{%define}=20variable=0A+@code{api.prefix}=20=
(possibly=20using=20the=20option=0A+@samp{-Dapi.prefix=3D@var{prefix}},=20=
see=20@ref{Invocation,=20,Invoking=20Bison}).=0A+This=20renames=20the=20=
interface=20functions=20and=20variables=20of=20the=20Bison=20parser=20to=0A=
+start=20with=20@var{prefix}=20instead=20of=20@samp{yy},=20and=20all=20=
the=20macros=20to=20start=20by=0A+@var{PREFIX}=20(i.e.,=20@var{prefix}=20=
upper=20cased)=20instead=20of=20@samp{YY}.=20=20You=20can=0A+use=20this=20=
to=20give=20each=20parser=20distinct=20names=20that=20do=20not=20=
conflict.=0A+=0A+The=20renamed=20symbols=20include=20@code{yyparse},=20=
@code{yylex},=20@code{yyerror},=0A+@code{yynerrs},=20@code{yylval},=20=
@code{yylloc},=20@code{yychar}=20and=0A+@code{yydebug}.=20=20If=20you=20=
use=20a=20push=20parser,=20@code{yypush_parse},=0A+@code{yypull_parse},=20=
@code{yypstate},=20@code{yypstate_new}=20and=0A+@code{yypstate_delete}=20=
will=20also=20be=20renamed.=20=20The=20renamed=20macros=20include=0A=
+@code{YYSTYPE},=20@code{YYSTYPE_IS_TRIVIAL},=20=
@code{YYSTYPE_IS_DECLARED},=0A+@code{YYLTYPE},=20=
@code{YYLTYPE_IS_TRIVIAL},=20and=20@code{YYLTYPE_IS_DECLARED}.=0A+=0A=
+For=20example,=20if=20you=20use=20@samp{%define=20api.prefix=20c},=20=
the=20names=20become=0A+@code{cparse},=20@code{clex},=20@dots{},=20=
@code{CSTYPE},=20@code{CLTYPE},=20and=20so=0A+on.=0A+=0A+The=20=
@code{%define}=20variable=20@code{api.prefix}=20works=20in=20two=20=
different=20ways.=0A+In=20the=20implementation=20file,=20it=20works=20by=20=
adding=20macro=20definitions=20to=20the=0A+beginning=20of=20the=20parser=20=
implementation=20file,=20defining=20@code{yyparse}=20as=0A=
+@code{@var{prefix}parse},=20and=20so=20on:=0A+=0A+@example=0A+#define=20=
YYSTYPE=20CTYPE=0A+#define=20yyparse=20cparse=0A+#define=20yylval=20=20=
clval=0A+...=0A+YYSTYPE=20yylval;=0A+int=20yyparse=20(void);=0A+@end=20=
example=0A+=0A+This=20effectively=20substitutes=20one=20name=20for=20the=20=
other=20in=20the=20entire=20parser=0A+implementation=20file,=20thus=20=
the=20``original''=20names=20(@code{yylex},=0A+@code{YYSTYPE},=20=
@dots{})=20are=20also=20usable=20in=20the=20parser=20implementation=20=
file.=0A+=0A+However,=20in=20the=20parser=20header=20file,=20the=20=
symbols=20are=20defined=20renamed,=20for=0A+instance:=0A+=0A+@example=0A=
+extern=20CSTYPE=20clval;=0A+int=20cparse=20(void);=0A+@end=20example=0A=
+=0A+Previously,=20a=20similar=20feature=20was=20provided=20by=20the=20=
obsoleted=20directive=0A+@code{%name-prefix}=20(@pxref{Table=20of=20=
Symbols,=20,Bison=20Symbols})=20and=20option=0A+@code{--name-prefix}=20=
(@pxref{Bison=20Options}).=0A=20=0A=20@node=20Interface=0A=20@chapter=20=
Parser=20C-Language=20Interface=0A@@=20-8924,8=20+8955,9=20@@=20Pretend=20=
that=20@code{%locations}=20was=20specified.=20=20@xref{Decl=20Summary}.=0A=
=20=0A=20@item=20-p=20@var{prefix}=0A=20@itemx=20=
--name-prefix=3D@var{prefix}=0A-Pretend=20that=20@code{%name-prefix=20=
"@var{prefix}"}=20was=20specified.=0A-@xref{Decl=20Summary}.=0A+Pretend=20=
that=20@code{%name-prefix=20"@var{prefix}"}=20was=20specified=20=
(@pxref{Decl=0A+Summary}).=20=20Obsoleted=20by=20=
@code{-Dapi.prefix=3D@var{prefix}}.=20=20@xref{Multiple=0A+Parsers,=20=
,Multiple=20Parsers=20in=20the=20Same=20Program}.=0A=20=0A=20@item=20-l=0A=
=20@itemx=20--no-lines=0A@@=20-11054,9=20+11086,24=20@@=20function=20is=20=
applied=20to=20the=20two=20semantic=20values=20to=20get=20a=20single=20=
result.=0A=20@end=20deffn=0A=20=0A=20@deffn=20{Directive}=20%name-prefix=20=
"@var{prefix}"=0A-Bison=20declaration=20to=20rename=20the=20external=20=
symbols.=20=20@xref{Decl=20Summary}.=0A+Obsoleted=20by=20the=20=
@code{%define}=20variable=20@code{api.prefix}=20(@pxref{Multiple=0A=
+Parsers,=20,Multiple=20Parsers=20in=20the=20Same=20Program}).=0A+=0A=
+Rename=20the=20external=20symbols=20(variables=20and=20functions)=20=
used=20in=20the=20parser=20so=0A+that=20they=20start=20with=20=
@var{prefix}=20instead=20of=20@samp{yy}.=20=20Contrary=20to=0A=
+@code{api.prefix},=20do=20no=20rename=20types=20and=20macros.=0A+=0A=
+The=20precise=20list=20of=20symbols=20renamed=20in=20C=20parsers=20is=20=
@code{yyparse},=0A+@code{yylex},=20@code{yyerror},=20@code{yynerrs},=20=
@code{yylval},=20@code{yychar},=0A+@code{yydebug},=20and=20(if=20=
locations=20are=20used)=20@code{yylloc}.=20=20If=20you=20use=20a=0A+push=20=
parser,=20@code{yypush_parse},=20@code{yypull_parse},=20@code{yypstate},=0A=
+@code{yypstate_new}=20and=20@code{yypstate_delete}=20will=20also=20be=20=
renamed.=20=20For=0A+example,=20if=20you=20use=20@samp{%name-prefix=20=
"c_"},=20the=20names=20become=0A+@code{c_parse},=20@code{c_lex},=20and=20=
so=20on.=20=20For=20C++=20parsers,=20see=20the=0A+@code{%define=20=
namespace}=20documentation=20in=20this=20section.=0A=20@end=20deffn=0A=20=
=0A+=0A=20@ifset=20defaultprec=0A=20@deffn=20{Directive}=20=
%no-default-prec=0A=20Do=20not=20assign=20a=20precedence=20to=20rules=20=
that=20lack=20an=20explicit=20@samp{%prec}=0Adiff=20--git=20=
a/src/getargs.c=20b/src/getargs.c=0Aindex=203fa2a7a..599cbba=20100644=0A=
---=20a/src/getargs.c=0A+++=20b/src/getargs.c=0A@@=20-311,10=20+311,11=20=
@@=20Parser:\n\=0A=20=20=20-S,=20--skeleton=3DFILE=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20specify=20the=20skeleton=20to=20use\n\=0A=20=20=20-t,=20=
--debug=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
instrument=20the=20parser=20for=20debugging\n\=0A=20=20=20=20=20=20=20=
--locations=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20enable=20=
location=20support\n\=0A-=20=20-D,=20--define=3DNAME[=3DVALUE]=20=20=20=20=
=20=20=20=20similar=20to=20`%define=20NAME=20\"VALUE\"'\n\=0A-=20=20-F,=20=
--force-define=3DNAME[=3DVALUE]=20=20override=20`%define=20NAME=20=
\"VALUE\"'\n\=0A+=20=20-D,=20--define=3DNAME[=3DVALUE]=20=20=20=20=20=20=20=
=20similar=20to=20'%define=20NAME=20\"VALUE\"'\n\=0A+=20=20-F,=20=
--force-define=3DNAME[=3DVALUE]=20=20override=20'%define=20NAME=20=
\"VALUE\"'\n\=0A=20=20=20-p,=20--name-prefix=3DPREFIX=20=20=20=20=20=20=20=
=20=20prepend=20PREFIX=20to=20the=20external=20symbols\n\=0A-=20=20-l,=20=
--no-lines=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20don't=20=
generate=20`#line'=20directives\n\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
deprecated=20by=20'-Dapi.prefix=3DPREFIX'\n\=0A+=20=20-l,=20--no-lines=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20don't=20generate=20=
'#line'=20directives\n\=0A=20=20=20-k,=20--token-table=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20include=20a=20table=20of=20token=20names\n\=0A=
=20\n\=0A=20"),=20stdout);=0Adiff=20--git=20a/tests/headers.at=20=
b/tests/headers.at=0Aindex=20549d62d..970d3f1=20100644=0A---=20=
a/tests/headers.at=0A+++=20b/tests/headers.at=0A@@=20-117,3=20+117,93=20=
@@=20AT_COMPILE([caller],=20[caller.o=20input.o])=0A=20=
AT_PARSER_CHECK([./caller])=0A=20=0A=20AT_CLEANUP=0A+=0A+##=20=
-----------------=20##=0A+##=20Several=20parsers.=20=20##=0A+##=20=
-----------------=20##=0A+=0A+AT_SETUP([Several=20parsers])=0A+=0A+#=20=
AT_DATA_GRAMMAR_SEVERAL([PREFIX],=20[DIRECTIVES])=0A+#=20=
-----------------------------------------------=0A+#=20Generate=20and=20=
compile=20to=20*.o.=20=20Make=20sure=20there=20is=20no=20YY*=20nor=20yy*=20=
in=0A+#=20the=20header=20(but=20YYDEBUG=20and=20YYPARSE_PARAM).=0A=
+m4_define([AT_DATA_GRAMMAR_SEVERAL],=0A=
+[AT_BISON_OPTION_PUSHDEFS([%define=20api.prefix=20"$1_"=20$2])=0A=
+AT_DATA_GRAMMAR([AT_SKEL_CC_IF([$1.yy],=20[$1.y])],=0A+[[%define=20=
api.prefix=20"$1_"=0A+$2=0A+%union=0A+{=0A+=20=20int=20integer;=0A+}=0A=
+%{=0A+#include=20<stdio.h>=0A+=20=20]AT_YYERROR_DECLARE[=0A+=20=20=
]AT_YYLEX_DECLARE[=0A+%}=0A+%%=0A+exp:=0A+=20=20'x'=20'1'=20{=20printf=20=
("x1\n");=20}=0A+|=20'x'=20'2'=20{=20printf=20("x2\n");=20}=0A+|=20'x'=20=
'3'=20{=20printf=20("x3\n");=20}=0A+|=20'x'=20'4'=20{=20printf=20=
("x4\n");=20}=0A+|=20'x'=20'5'=20{=20printf=20("x5\n");=20}=0A+|=20'x'=20=
'6'=20{=20printf=20("x6\n");=20}=0A+;=0A+=0A+%%=0A+]AT_YYERROR_DEFINE[=0A=
+]AT_YYLEX_DEFINE(["$1"])[=0A+]])=0A+=0A+AT_BISON_CHECK([-d=20-o=20=
AT_SKEL_CC_IF([$1.cc=20$1.yy],=20[$1.c=20$1.y])])=0A+#=20C++=20output=20=
relies=20on=20namespaces=20and=20still=20uses=20yy=20a=20lot.=0A=
+AT_SKEL_CC_IF([],=0A+=20=20[AT_CHECK([$EGREP=20-i=20yy=20$1.h=20|=20=
$EGREP=20-v=20'YY(DEBUG|PARSE_PARAM)'],=20[1])])=0A=
+AT_LANG_COMPILE([$1.o])=0A+AT_BISON_OPTION_POPDEFS=0A+])=0A+=0A=
+AT_DATA([main.cc],=0A+[[extern=20"C"=0A+{=0A+=20=20#include=20"x1.h"=0A=
+=20=20#include=20"x2.h"=0A+=20=20#include=20"x3.h"=0A+=20=20#include=20=
"x4.h"=0A+}=0A+#include=20"x5.hh"=0A+//#include=20"x6.hh"=0A+int=0A+main=20=
(void)=0A+{=0A+=20=20int=20errs=20=3D=200;=0A+=20=20errs=20+=3D=20=
x1_parse();=0A+=20=20errs=20+=3D=20x2_parse();=0A+=20=20errs=20+=3D=20=
x3_parse();=0A+=20=20errs=20+=3D=20x4_parse();=0A+=20=20x5_::parser=20=
p5;=0A+=20=20errs=20+=3D=20p5.parse();=0A+//=20=20errs=20+=3D=20=
x6_parse();=0A+=20=20return=20!!errs;=0A+}=0A+]])=0A+=0A=
+AT_DATA_GRAMMAR_SEVERAL([x1],=20[])=0A+AT_DATA_GRAMMAR_SEVERAL([x2],=20=
[%locations=20%debug])=0A+AT_DATA_GRAMMAR_SEVERAL([x3],=20[%glr-parser])=0A=
+AT_DATA_GRAMMAR_SEVERAL([x4],=20[%locations=20%debug=20%glr-parser])=0A=
+AT_DATA_GRAMMAR_SEVERAL([x5],=20[%locations=20%debug=20%language=20=
"c++"])=0A+#AT_DATA_GRAMMAR_SEVERAL([x6],=20[%locations=20%language=20=
"c++"])=0A+=0A+AT_COMPILE_CXX([parser],=20[x1.o=20x2.o=20x3.o=20x4.o=20=
x5.o=20main.cc])=0A+AT_CHECK([./parser],=20[0],=0A+[[x1=0A+x2=0A+x3=0A=
+x4=0A+x5=0A+]])=0A+=0A+AT_CLEANUP=0Adiff=20--git=20a/tests/local.at=20=
b/tests/local.at=0Aindex=201baf661..7a981c6=20100644=0A---=20=
a/tests/local.at=0A+++=20b/tests/local.at=0A@@=20-145,6=20+145,8=20@@=20=
m4_pushdef([AT_API_prefix],=0A=20[m4_bmatch([$3],=20[%define=20=
api\.prefix=20".*"],=0A=20=20=20=20=20=20=20=20=20=20=20=20=
[m4_bregexp([$3],=20[%define=20api\.prefix=20"\([^""]*\)"],=20[\1])],=0A=20=
=20=20=20=20=20=20=20=20=20=20=20[yy])])=0A+m4_pushdef([AT_API_PREFIX],=0A=
+[m4_toupper(AT_API_prefix)])=0A=20#=20yyerror=20receives=20the=20=
location=20if=20%location=20&=20%pure=20&=20(%glr=20or=20%parse-param).=0A=
=20m4_pushdef([AT_YYERROR_ARG_LOC_IF],=0A=20=
[AT_GLR_OR_PARAM_IF([AT_PURE_AND_LOC_IF([$1],=20[$2])],=0A@@=20-165,10=20=
+167,10=20@@=20m4_pushdef([AT_PURE_LEX_IF],=0A=20=0A=20=
m4_pushdef([AT_YYSTYPE],=0A=20=
[AT_SKEL_CC_IF([AT_NAME_PREFIX[::parser::semantic_type]],=0A-=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20[[YYSTYPE]])])=0A+=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20[AT_API_PREFIX[STYPE]])])=0A=20=
m4_pushdef([AT_YYLTYPE],=0A=20=
[AT_SKEL_CC_IF([AT_NAME_PREFIX[::parser::location_type]],=0A-=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20[[YYLTYPE]])])=0A+=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20[AT_API_PREFIX[LTYPE]])])=0A=20=0A=20=0A=20=
AT_PURE_LEX_IF(=0A@@=20-221,6=20+223,7=20@@=20m4_popdef([AT_LOC])=0A=20=
m4_popdef([AT_PURE_LEX_IF])=0A=20m4_popdef([AT_YYERROR_SEES_LOC_IF])=0A=20=
m4_popdef([AT_YYERROR_ARG_LOC_IF])=0A+m4_popdef([AT_API_PREFIX])=0A=20=
m4_popdef([AT_API_prefix])=0A=20m4_popdef([AT_NAME_PREFIX])=0A=20=
m4_popdef([AT_GLR_OR_PARAM_IF])=0A--=20=0A1.7.11.1=0A=0A=

--Apple-Mail=_7685FED1-3B79-4197-8636-5504E12B2096--


