Re: merge function called AFTER user actions

2005-09-26 Thread Joel E. Denny
On Mon, 26 Sep 2005, Derek M Jones wrote: My point here is that the current functionality seems natural and necessary for all GLR parsers. Do you disagree? Either before or after is necessary. Both would be helpful. I'm not sure the term 'natural' can be applied to a human invention. I see

Re: merge function called AFTER user actions

2005-09-26 Thread Hans Aberg
On 23 Sep 2005, at 03:33, Derek M Jones wrote: If I knew in advance (that is, before the action associated with a rule was executed) I could set some variable that could be tested in the action to decide whether to handle the common case or whether some kind of semantic ambiguity resolution was

Re: merge function called AFTER user actions

2005-09-26 Thread Joel E. Denny
On Mon, 26 Sep 2005, Derek M Jones wrote: This pre-merge user function would be an extra feature. I don't foresee myself using it, so I really can't justify spending my own time implementing it and arguing for its acceptance. Thanks for considering it. The implementation is trivial and I hop

Re: merge function called AFTER user actions

2005-09-26 Thread Derek M Jones
Joel, My point here is that the current functionality seems natural and necessary for all GLR parsers. Do you disagree? Either before or after is necessary. Both would be helpful. I'm not sure the term 'natural' can be applied to a human invention. Ok, so let's change its name. %premerge

Re: merge function called AFTER user actions

2005-09-26 Thread Joel E. Denny
On Mon, 26 Sep 2005, Derek M Jones wrote: Does anybody know why the decision was made to have the %merge function called last? This choice seems to be very suboptimal. The merge function's job is to merge the semantic values constructed by the two actions. If it were called before the acti

Re: merge function called AFTER user actions

2005-09-26 Thread Joel E. Denny
On Fri, 23 Sep 2005, Derek M Jones wrote: Unfortunately the function associated with %merge is called AFTER the actions are executed. Does anybody know why the decision was made to have the %merge function called last? This choice seems to be very suboptimal. The merge function's job is

Re: merge function called AFTER user actions

2005-09-26 Thread Derek M Jones
Joel, Does anybody know why the decision was made to have the %merge function called last? This choice seems to be very suboptimal. The merge function's job is to merge the semantic values constructed by the two actions. If it were called before the actions, what would it merge? Ok, so

merge function called AFTER user actions

2005-09-22 Thread Derek M Jones
All, I have finally gotten around to trying to do something sensible with my C grammar (see discussion during February). Just to remind you all, %merge was used to disambiguate situations like: (x) * y; ie, is this a cast of *y to type x, or a multiplication of x by y? In most cases the expres