help-bison
[Top][All Lists]
Advanced

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

Re: C++ / multiple instances / iostreams


From: Detlef Vollmann
Subject: Re: C++ / multiple instances / iostreams
Date: Sat, 24 Jul 2004 16:49:13 +0200

Hans Aberg wrote:
> 
> At 11:06 +0200 2004/07/24, Detlef Vollmann wrote:
> >Hmmm, if I look at my C++ skeleton for byacc, I don't see the need
> >for copying the whole stack.  The only multi-element operation
> >I use is on a reduction with a length > 1.  All others modifying
> >operations are only single-element push and pop.
> 
> It is when the stack runs out of space. The current Bison parser C stack is
> dynamic, and actually works that way.
Ah, I see.  I use std::deque, which doesn't do re-allocation on
expanding but links new chunks to existing ones when growing.
It doesn't do automatic shrinking but I think that isn't a wise
thing to do anyway.

Detlef

-- 
Detlef Vollmann   vollmann engineering gmbh
Linux and C++ for Embedded Systems    http://www.vollmann.ch/




reply via email to

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