bison-patches
[Top][All Lists]
Advanced

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

%destructor default


From: Bill Fenlason
Subject: %destructor default
Date: Thu, 28 Oct 2004 21:37:18 -0400

In some cases, it's useful to be able to provide a default destructor for
symbols discarded by the parser.  Examples are large grammars, or when there
is a large number of terminal symbols, or anytime that all discarded symbols
are to be treated the same.

I've attached a small patch (6 additional source lines) which adds the
ability to specify a %destructor declaration without any symbols, and to use
the specified code as the default destructor.

As discussed in the help-bison forum, I have not yet completed the paperwork
to become an "official contributor", but I believe the guidelines allow tiny
changes such as this to be considered for contribution.

It may be that the decisions regarding the %destructor syntax change and the
added function are more significant than the code to implement the change.

The patch is for the beta:
<URL:http://www.lrde.epita.fr/~akim/download/bison-1.875e.tar.bz2> dated
10/25/2004 12:51 PM.  (In the help forum, Akim suggested that this beta is
the most up to date, and that patches should be posted here).  If a patch
for the current CVS version would be more appropriate, I'll be glad to
generate it.

I've also attached a preliminary ChangeLog entry.

Thank you.

Bill Fenlason


Attachment: patch
Description: Binary data

Attachment: ChangeLog
Description: Binary data


reply via email to

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