Re: Initialise tokens in bison/flex

chrisd@reservoir.com (Chris Dodd)
17 Mar 2002 22:56:00 -0500

          From comp.compilers

Related articles
Initialise tokens in bison/flex rupp@fzi.de (Torsten Rupp) (2002-03-09)
Re: Initialise tokens in bison/flex haberg@matematik.su.se (2002-03-11)
Re: Initialise tokens in bison/flex {spamtrap}@qeng-ho.org (Maneki Neko) (2002-03-17)
Re: Initialise tokens in bison/flex clint@0lsen.net (Clint Olsen) (2002-03-17)
Re: Initialise tokens in bison/flex chrisd@reservoir.com (2002-03-17)
| List of all articles for this month |
From: chrisd@reservoir.com (Chris Dodd)
Newsgroups: comp.compilers
Date: 17 Mar 2002 22:56:00 -0500
Organization: Posted via Supernews, http://www.supernews.com
References: 02-03-046 02-03-052
Keywords: yacc, storage
Posted-Date: 17 Mar 2002 22:56:00 EST

Torsten Rupp <rupp@fzi.de> wrote:
>Does anybody know how I can handle resource allocation/free resources
>in tokens for bison/flex?


Basically, you need garbage collection.


You can either roll your own (using a pool based allocator/collector
as the moderator suggests, or perhaps some C++ smart-pointer scheme
that does reference counting), or use a bolt-on garbage collector
such as the Boehm-Demers-Weiser conservative collector for C.
<http://www.hpl.hp.com/personal/Hans_Boehm/gc/index.html>


Chris Dodd
chrisd@reservoir.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.