Is it possible to add a default action to yydestruct?

Two reasons:
1. For most of the tokens, the action is the same, e.g
free the memory. Only for a few tokens one want to
customize the behavior - that's where %destructor can
be put to best use.
2. In a large grammar, forgetting to add a token to
the %destructor directive can cause a lot of
grievance. A default action can serve as a safety net.

I'm thinking about an optional macro, similar to
YYPRINT. The default is do nothing. User can define
their own. It's probably cheap to add, only the m4
files need to be touched.

Thanks, -zl




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to