This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] broken build using bison-1.75


"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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]