help-bison
[Top][All Lists]
Advanced

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

A question about error recovery


From: zhke
Subject: A question about error recovery
Date: Wed, 3 Jul 2002 17:38:10 +0800

Hi there,
 
I have a question on memory recycling while handling parse errors.My situation is as below:
I defined the YYSTYPE as a pointer to a structure,something like
struct Object{
....
};
#define YYSTYPE Object*
 
I allocate memory for Objects in yylex(),and return the pointers as yylval.
Now if a parse error occurs,I want to abort from the yyparse() .How should I free memory of those objects remaining in the parse stack?Because my application is a deamon process,so the memory leaking is not endurable.
Could anybody give me any advice?Any reply would be appreciated.
 
Thanks,
 
Whyithappen
 

reply via email to

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