Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: "Theodore A. Roth" <troth@openavr.org>
Cc: Michael Snyder <msnyder@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] broken build using bison-1.75
Date: Thu, 07 Nov 2002 09:47:00 -0000	[thread overview]
Message-ID: <vt2k7jpe15b.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0211061245230.12303-100000@knuth.amplepower.com>


"Theodore A. Roth" <troth@openavr.org> 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.
> 
> <snip>
> 
> :) 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.)


  parent reply	other threads:[~2002-11-07 17:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05  9:54 Theodore A. Roth
2002-11-06 12:23 ` Michael Snyder
2002-11-06 12:54   ` Theodore A. Roth
2002-11-06 13:25     ` Michael Snyder
2002-11-07  9:47     ` Jim Blandy [this message]
2002-11-07 12:05 ` Jim Blandy
2002-11-07 12:14   ` Jim Blandy
2002-11-06 13:38 Johannes Stezenbach
2002-11-06 13:57 ` Theodore A. Roth
2002-11-06 14:05   ` Johannes Stezenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vt2k7jpe15b.fsf@zenia.red-bean.com \
    --to=jimb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@redhat.com \
    --cc=troth@openavr.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox