help-bison
[Top][All Lists]
Advanced

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

Re: Unabled to Free Discarded Tokens


From: Mike Ady
Subject: Re: Unabled to Free Discarded Tokens
Date: Mon, 16 Feb 2004 01:57:13 +0100

> You have got it right: With Bison generate parsers in C, you must either
> keep track of the allocations separately and deallocate them when
> appropriate, and free them by hand, or you might try an experimental
> %destructor, which I think might be undocumented. The %destructor only
> makes destructions when in error recovery mode; other deallocations must
> still be done. See a recent post in the Bug-Bison list.
>
> I use Bison generated parsers in C++, where the language can create code
> that performs the correct deallocations.

Thanks Hans,

Tomas Stanek already sent me some notes about %destructor.

I don't work with Bison very often.  Unfortunately, for this project, I am
working in Win32, with the GnuWin32 distribution.  The GnuWin32 Bison, is
still at version 1.35.  When I checked the gnu website, I found that the
online copy of the Bison manual was also at version 1.35.  (Version 1.35 of
Bison did not support %destructor.)  I didn't even check inside the Bison
version 1.875 distribution.

I have since downloaded the version 1.875 documentation, and I will update
my copy of Cygwin and try running Bison under Cygwin instead of GnuWin32.

Regards,
Mike Ady

>
>   Hans Aberg
>
>






reply via email to

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