I'd like to push this patch to master and branch-2.5. I need it for
that
lookahead correction implementation I spoke about recently, but I
think
it's worthwhile on its own as well. Any objections? I haven't
looked at
porting this to the other skeletons yet, but would there be any
objections
there?
From d3334adb83a8b87cfa7528ab184d0dbbe7283858 Mon Sep 17 00:00:00
2001
From: Joel E. Denny <address@hidden>
Date: Mon, 7 Sep 2009 22:01:16 -0400
Subject: [PATCH] yysyntax_error: make it manage its own memory.
This improves readability, eliminates the need to invoke the
function twice and thus repeat the lookahead collection, and
prepares for future extensions that will make those repetitions
more expensive and that will require additional memory
management in yysyntax_error.
* data/yacc.c (yysyntax_error): Add arguments for message
buffer variables stored in the parser. Instead of size, return
status similar to yyparse status but indicating success of
message creation. Import memory management code from...
(yyparse, yypush_parse): ... here.