bison-patches
[Top][All Lists]
Advanced

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

Re: glr.c cleanup


From: Hans Aberg
Subject: Re: glr.c cleanup
Date: Thu, 8 Dec 2005 11:22:55 +0100

On 8 Dec 2005, at 08:58, Joel E. Denny wrote:

Under C++, one would be able to choose stack, with at least two standard
choices: std::vector, and std::deque.

I see.  I need to study this thing some day.

When std::deque runs out of allocation, it allocates a new memory chunk for extension without keeping the old one intact, thus avoiding invoking copy constructors, using C++ class interface capability to paste it together transparently. The class std::vector is just a traditional array, which copies the old data over to a larger chunk. Thus, it works like the current C stacks that Bison uses.

  Hans Aberg






reply via email to

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