From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6332 invoked by alias); 7 Nov 2002 17:47:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6242 invoked from network); 7 Nov 2002 17:47:32 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 7 Nov 2002 17:47:32 -0000 Received: (from jimb@localhost) by zenia.red-bean.com (8.11.6/8.11.6) id gA7HWWp26370; Thu, 7 Nov 2002 12:32:32 -0500 To: "Theodore A. Roth" Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [RFC] broken build using bison-1.75 References: From: Jim Blandy Date: Thu, 07 Nov 2002 09:47:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.90 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-11/txt/msg00180.txt.bz2 "Theodore A. Roth" writes: > On Wed, 6 Nov 2002, Michael Snyder wrote: > > :) "Theodore A. Roth" wrote: > :) > The attached patch got gdb to compile for me using bison 1.75 and 1.35 on > :) > a debian system. The missing semicolons seem obvious fixes to me, but the > :) > new setup rule I added I'm not sure about since I can't test this myself > :) > and don't have a good understanding of yacc grammar. > > > > :) Yeah, bison has fallen into dis-use in favor of byacc. > :) I'll give you approval to check in all the missing semicolons. > :) As for the new setup rule, have you tested it using byacc? > > Just compiled with byacc 1.9 and it didn't puke on the setup rule I added. > > I not sure if my setup rule is the right thing to do and was hoping > someone with more experience could comment on it correctness (or lack > thereof). I based the change on the information at the end of this page: > > http://www.gnu.org/manual/bison/html_node/Mid-Rule-Actions.html If that special setup rule is necessary in p-exp.y, that's a bug in Bison, I'm pretty sure. The trick of introducing a new non-terminal symbol with no tokens and an action should only be necessary when Bison doesn't have enough information from the grammar to tell whether to execute the action. But the 'start' symbol isn't used anywhere else in the grammar, and it doesn't have any alternatives --- if you're in the start state, you've got to run that action. (And as a sanity check --- the paragraph at the end of the section of the Bison manual you posted a link to says that you're doing manually what Bison is supposed to do automatically to handle internal actions.)