bison-patches
[Top][All Lists]
Advanced

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

Re: %destructor declared by semantic type


From: Akim Demaille
Subject: Re: %destructor declared by semantic type
Date: Wed, 21 Jun 2006 09:39:38 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

>>> "Joel" == Joel E Denny <address@hidden> writes:

 > I think I've come up with a reasonable plan to handle all this.  My
 > full proposal is here:

 >   http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00067.html

 > What do you think?

I feel uncomfortable with Bison looking too much at actions.  Your
rules are smart, but they are complex, and it might be less user
friendly than a simpler rule (but intrinsically less user-friendly :).

When the user is toying with $<T>$, she is aware that's is basically a
cast (wrt Bison's system), and she's on her own.

As for mid-rules actions, they're just syntactic sugar, and we might
be pushing it too far.  After all the user can declare a new symbol
and fall back to the regular case.

Or maybe we want to be able to report things such as

   exp: exp %type <int>{ $$=$1; } '+' exp { $$ = $2 + $4; };

or without the %type?


To put it shortly: it would prefer less smart, but simpler.

Also, please, consider applying these changes to %printer too.





reply via email to

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