help-bison
[Top][All Lists]
Advanced

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

Unabled to Free Discarded Tokens


From: Mike Ady
Subject: Unabled to Free Discarded Tokens
Date: Sat, 14 Feb 2004 08:27:01 -0700

Sirs,

I have a lexer that uses malloc (more than once) to store the data
associated with most tokens.  These malloc'ed tokens are then assembled into
various structures by my parser before being executed and finally freed.
Everything is fine until an error occurs.  I suffer memory leaks whenever
Bison is forced to discard tokens.

I've searched the documentation...  Is there any way to get Bison to call a
routine (to free allocated memory) for each discarded token?

Or am I just going about this the wrong way?  Creating a symbol table for
this application would seem to be overkill.

Thanks,
Mike Ady





reply via email to

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