help-bison
[Top][All Lists]
Advanced

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

Re: No destructors called after a successful parse!


From: Andrew Chanler
Subject: Re: No destructors called after a successful parse!
Date: Thu, 15 May 2003 14:28:39 -0700 (PDT)

hi

correct me if im wrong but the %destructor is not designed for
successful parses. the %destructor rule is only called if that token
was popped from the stack after an error.

so basically you have to do all the destructing by hand(in your rules)
when parsing does not encounter errors. 


Andrew Chanler

--- Ricardo Rafael <address@hidden> wrote:
> Hi,
> 
>        I have been developing a script compiler to be run as server
> side 
> reentrant process. I in the last devoping stage where I am debugging
> and 
> removing all memory leaks. I am using Flex 2.5.4 (to generate C++ 
> classes) and Bison 1.875 (to generate C reentrant code). I am also
> using 
> the %destructor syntax.
> 
>     By running the debugger and using some breakpoints, today I came
> to 
> the conclusion that the "destructors" aren't called at all when there
> is 
> no syntax error. They are only called in case of a syntax error! Is
> this 
> the correct way? Shouldn't Bison (well the generated code) call the 
> destructors after a successful parsing?
> 
>     Please, don't tell me that I have "manually" invoke de
> deallocating 
> code in (almost) every Bison action rule! :(
> 
> 
> Sincerely,
> 
> Ricardo Rafael.
> 
> 
> 
> _______________________________________________
> address@hidden http://mail.gnu.org/mailman/listinfo/help-bison


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




reply via email to

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