[Top][All Lists]

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

Re: push parser

From: Bob Rossi
Subject: Re: push parser
Date: Wed, 11 Oct 2006 11:30:43 -0400
User-agent: Mutt/1.5.11

On Tue, Oct 10, 2006 at 10:32:25PM -0700, Paul Eggert wrote:
> Bob Rossi <address@hidden> writes:
> > Are you suggesting I could take the 
> > 'char yymsgbuf[128];' out of the 'struct yypvars' and simply use the
> > one on the stack that appears each time yypushparse is called?
> Yes, I think so.  But you know the code better than I.

OK, one problem at a time. Here is a patch against push.c that removes
the yymsgbuf, yymsgbuf_ptr, yymsg and yymsg_alloc fields from the
yypvars structure. So, there is a yymsgbuf array in the yypushparse
function that yypushparse uses. The array is pushed on the stack 
each time yypushparse is called, and the data is not persistant between
yypushparse calls. I have absolutly no idea what yymsgbuf is used for.

If the data does not need to be persistant between calls, and if this
array does not cause the push parser to be non reentrant between calls,
then this patch should be applied.

What do you think?
Bob Rossi

2006-10-11  Bob Rossi  <address@hidden>

        * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
        yymsg_alloc fields.
        (yypvarsinit, yypushparse): Remove init of removed fields.
        (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.

Attachment: push-yymsgbuf.diff
Description: Text document

reply via email to

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