[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GLR C++ Variants
From: |
Сергей Фасман |
Subject: |
Re: GLR C++ Variants |
Date: |
Mon, 13 Jan 2020 22:22:58 +0300 |
As I know, std::vector will be enough here.
I am confused about yybool typedef. Why do need one, if we use C++ anyway.
And I hope there will be less defines in common.
I've fork the repo with updated glr.cc. Maybe I try to clean it?
пн, 13 янв. 2020 г., 21:03 Frank Heckenbach <address@hidden>:
> Valentin Tolmer wrote:
>
> > I've been mostly changing the glr.c code (copied to glr.cc) to look
> > like C++, with classes, methods, and modern containers. Last I
> > remember, I hit a snag trying to update an arena-style container with
> > internal pointers to std::vector, due to the potentially moving
> > memory.
>
> Just a quick idea without knowing details: Might std::deque help
> here? It doesn't move on reallocation. OTOH, it doesn't guarantee
> contiguous storage in case you need that.
>
> Regards,
> Frank
>