bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push parser


From: Bob Rossi
Subject: Re: push parser
Date: Tue, 26 Sep 2006 09:08:58 -0400
User-agent: Mutt/1.5.11

On Mon, Sep 25, 2006 at 11:15:50PM -0700, Paul Eggert wrote:
> Bob Rossi <address@hidden> writes:
> 
> >> I have a small patch that get's me this far:
> >>   status = yypushparse (ctx, ch, &yylval);
> >> 
> >> What should I do about yylval?
> 
> Sorry, I don't understand the question; perhaps you meant yyloc?

Wow, I must have been having a bad day. Yes, I did mean yyloc.

> >> I can attempt to make yypushparse have an extra parameter when locations
> >> are enabled. Does that sound correct?
> 
> Yes, that sounds fine.

OK, great.

> > Here, is a patch I'm posting just for you to tell me if this is the
> > appropriate solution.
>
> Sorry, I'm a bit lost.  That patch modifies yacc.c and puts a bunch of
> push-parser stuff in it; but yacc.c differs from push.c afterwards.
> Is this intended?  I thought the patch would just affect push.c.

Again, sorry. I only meant to send a patch to push.c in. I 'cp push.c
yacc.c' when I run the testsuite, to make sure that nothing regressed.

> The push.c patch looks OK, except there still seems to be some
> confusion about YYLTYPE_IS_TRIVIAL versus b4_locations_if.
> YYLTYPE_IS_TRIVIAL is defined if it is known that YYLTYPE is a trivial
> type (in the C++ sense: it's just a bunch of bytes).  But in the patch
> YYLTYPE_IS_TRIVIAL seems to be used for some other purpose.

Yes, I knew I was still doing this. I am going to do this the correct
way once I understand what that is. I think I finally get it now. If
locations are being used, then yylloc is available? I was using 
YYLTYPE_IS_TRIVIAL for that :(.

Here is another posting of the patch, if you like how it looks I'll
resend with ChangeLog.

Thanks,
Bob Rossi

Attachment: push.c.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]