> On 27 Dec 2016, at 00:48, William Brannon <[email protected]> wrote:

> My question is: do the actions for these productions need to
> explicitly deallocate memory associated with the unused tokens? I
> believe not, because:
> o) the tokens don't have types, so they're just #define'd to integers,
> o) which is why bison doesn't warn about unused tokens, and which implies
> o) there's no memory to deallocate.
> 
> But I can't find a solid answer to this question online. If it
> matters, this is a C++ parser...

In C++, the parser stack is a std::deque container, which will deallocate all 
that is automatically deallocated by C++, but not explicit operator new(), 
malloc() etc.



_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to