Re: %destructor feedback

2005-10-20 Thread Frank Heckenbach
Akim Demaille wrote: > Maybe that does not deserve that much attention: it seems pretty weird > not to use a value. A warning seems a better feature. I sometimes attach some kinds of flags (integer type) to some symbols that I need in some, but not all, rules that use that symbol. So, if you go

Re: %destructor feedback

2005-10-20 Thread Joel E. Denny
On Thu, 20 Oct 2005, Paul Eggert wrote: "Joel E. Denny" <[EMAIL PROTECTED]> writes: This thread started on help-bison. At some point, I CC'ed to bug-bison. However, it eventually lost that CC and then picked it up again. Could this be why you missed messages? Yes, that's it. It's such a l

Re: %destructor feedback

2005-10-20 Thread Paul Eggert
"Joel E. Denny" <[EMAIL PROTECTED]> writes: > This thread started on help-bison. At some point, I CC'ed to > bug-bison. However, it eventually lost that CC and then picked it up > again. Could this be why you missed messages? Yes, that's it. It's such a long thread, though. If you're thinking

Re: %destructor feedback

2005-10-20 Thread Joel E. Denny
On Thu, 20 Oct 2005, Paul Eggert wrote: "Joel E. Denny" <[EMAIL PROTECTED]> writes: Paul, I just looked through the ChangeLog. I believe you committed the patch that made YYABORT and YYACCEPT invoke RHS destructors. Yes, I'm the guilty party. :-) I hadn't thought through these consequence

Re: %destructor feedback

2005-10-20 Thread Paul Eggert
"Joel E. Denny" <[EMAIL PROTECTED]> writes: > Paul, I just looked through the ChangeLog. I believe you committed > the patch that made YYABORT and YYACCEPT invoke RHS destructors. Yes, I'm the guilty party. :-) I hadn't thought through these consequences. > As I see it, there would be one rul

Re: %destructor feedback

2005-10-20 Thread Wolfgang Spraul
Akim - > We need no %destructor-param etc., we need to fix yydestructor and > yysymprint so that %parse-param are passed to them, just like yyerror. That would be perfectly fine for me. It's imaginable that someone wants to have different parameters for the different functions, but unless you se

Re: %destructor feedback

2005-10-20 Thread Akim Demaille
>>> "Wolfgang" == Wolfgang Spraul <[EMAIL PROTECTED]> writes: > Akim - Hey, >> I'm not sure about %param-destructor, it is not very clean, but just >> like there is %initial-action, we could introduce a %final-action >> always run when leaving yyparse (whether on failure or not). > When yo

Re: %destructor feedback

2005-10-20 Thread Wolfgang Spraul
Akim - > I'm not sure about %param-destructor, it is not very clean, but just > like there is %initial-action, we could introduce a %final-action > always run when leaving yyparse (whether on failure or not). When you say %param-destructor, do you mean the %destructor-param I was talking about?

Re: %destructor feedback

2005-10-20 Thread Joel E. Denny
On Thu, 20 Oct 2005, Akim Demaille wrote: "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes: > I've also noticed that the bison documentation says: > Note that in the future, Bison might also consider that right hand > side members that are not mentioned in the action can be destroyed. >

Re: %destructor feedback

2005-10-20 Thread Akim Demaille
>>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes: > On Tue, 18 Oct 2005, Joel E. Denny wrote: >>> For bison, I believe the order of importance on this cleanup issue >>> goes like >>> this: >>> 1. document cleanup behavior in the manual >>> 2. make cleanup behavior consistent across YYAB

Re: %destructor feedback

2005-10-20 Thread Akim Demaille
>>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes: > I prefer that the clean-up *not* happen automatically for either > YYABORT or YYERROR -- as in GLR parsing. This would allow for a > simple consistent rule: if the user's semantic action executes, > then the user's semantic action is re

Re: %destructor feedback

2005-10-20 Thread Akim Demaille
>>> "Wolfgang" == Wolfgang Spraul <[EMAIL PROTECTED]> writes: > Let's say you have an action that gets an object passed in which > has a destructor. When using YYABORT inside the action, the > destructor for this object is always called. When using YYERROR, it > is never called, i.e. the actio