Re: [PATCH] cex: fix leaks

Vincent Imbimbo <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <CANGxML4rAFKgFX+LgFVeTSHb6A2VUHcbPB=6qr+_T3X3mjfsOQ@mail.gmail.com>
Hey Akim,

> I also think changing the hash maps to bitset vectors is fine; I
> initially didn’t want to since I knew they could be pretty sparse.
>
> Then, instead of a bitsetv, a table of malloced bitsets should do it.  It
> might be sparse, but on a quite compact range, isn't it?
>

I realized this afternoon that it would probably be fine to put all of
these edges in the state-items themselves:

struct state_item
{
    ...
    struct state_item *transition;
    bitset productions;
    bitset revs;
};

The edges being in separate data structures is a holdover from the CUP
implementation, and I'm not sure if it makes sense to do this anymore.

~Vincent
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.