[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 13:42:27 -0400 |
User-agent: |
Mutt/1.5.11 |
On Wed, Oct 11, 2006 at 09:36:43AM -0700, Paul Eggert wrote:
> Bob Rossi <address@hidden> writes:
>
> > I have absolutly no idea what yymsgbuf is used for.
>
> It's used to construct an error message that is passed to
> yysyntax_error. yysyntax_error is not supposed to assume that the
> message is in static storage, so it's OK to make it auto.
>
> > What do you think?
>
> That looks good, except there's a memory leak if the push
> parser outputs a long diagnostic (thus calling malloc for
> yymsg), and then exits. I installed the following patch
> instead; I hope it works for you (at least, "make check"
> passes).
I had to make this change to get push.c to pass the test suite.
Bob Rossi
Index: push.c
===================================================================
RCS file: /sources/bison/bison/data/push.c,v
retrieving revision 1.4
diff -u -r1.4 push.c
--- push.c 11 Oct 2006 16:35:34 -0000 1.4
+++ push.c 11 Oct 2006 17:40:39 -0000
@@ -1391,7 +1391,7 @@
pv->yyval = yyval;
]b4_locations_if([pv->yyloc = yyloc;])[
goto yypushreturn;
-gottoken:])
+gottoken:])[
YYDPRINTF ((stderr, "Reading a token: "));
]b4_push_if([], [yychar = YYLEX;])[
}
- Re: push parser, (continued)
- Re: push parser, Paul Eggert, 2006/10/08
- Message not available
- Re: push parser, Paul Eggert, 2006/10/09
- Re: push parser, Bob Rossi, 2006/10/10
- Re: push parser, Paul Eggert, 2006/10/10
- Re: push parser, Bob Rossi, 2006/10/10
- Re: push parser, Paul Eggert, 2006/10/10
- Re: push parser, Bob Rossi, 2006/10/10
- Re: push parser, Paul Eggert, 2006/10/11
- Re: push parser, Bob Rossi, 2006/10/11
- Re: push parser, Paul Eggert, 2006/10/11
- Re: push parser,
Bob Rossi <=
- Re: push parser, Paul Eggert, 2006/10/11
- Re: push parser, Bob Rossi, 2006/10/11
- Re: push parser, Paul Eggert, 2006/10/11
- Re: push parser, Bob Rossi, 2006/10/11
- Re: push parser, Paul Eggert, 2006/10/12
Re: push parser, Bob Rossi, 2006/10/11