help-bison
[Top][All Lists]
Advanced

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

Re: %destructor feedback


From: Joel E. Denny
Subject: Re: %destructor feedback
Date: Tue, 18 Oct 2005 18:56:33 -0400 (EDT)

On Wed, 19 Oct 2005, Wolfgang Spraul wrote:

Are you now talking about a YYCLEANUP macro or YYABORT_CLEANUP and
YYERROR_CLEANUP macros?

If you mean YYCLEANUP, it would need to return.  Would a function call be
too inefficient?

Sorry, I made a mistake here. You are right - if YYCLEANUP is a goto, then it
cannot return. Surely a single function call would not be too much overhead
in my opinion.

Great.

I would prefer something like YYERROR_CLEANUP and
YYABORT_CLEANUP in _addition_ to the regular YYERROR/YYABORT macros.

After reading the ChangeLog, I've noticed there would also need to be a YYACCEPT_CLEANUP. More encouragement to go the single YYCLEANUP route.

My vote is in - YYERROR_CLEANUP+YYABORT_CLEANUP, but I would happily accept to
be the minority, and I wouldn't even have the time to create a patch for my
two cleanup macros anyway, so I depend on someone else's generosity to offer
or not offer 'more cleanup flexibility'.

Unless someone (hopefully) beats me to it, I may be the one to implement this. If so, I'll go for a single YYCLEANUP function. It may not be your strongest preference, but it seems it'll satisfy your needs.

A few warnings:

1. I believe there's a feature freeze until 2.2 is released.

2. I may rename YYCLEANUP to something better: yycleanup_rhs() or something like that. Just watch the mailing lists.

Thanks for the discussion.

Joel




reply via email to

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