Re[2]: memory leaks

2005-06-08 Thread Laurence Finston
On Tue, 7 Jun 2005, hz kto wrote:

>
>
> If I have a list like this wouldn't I run into the problem when,
> a parent node deletes some child nodes, then when I come across
> this child in the list, I will crash since it has been deleted already?

That was the point of the following remark:

> > Depending on circumstances, it might be advantageous for 'object'
> > to refer to a 'Foo**' rather than a 'Foo*'.

If this is unclear, I will be happy to provide an example.

If you only ever delete objects by means of their corresponding
'Object_Type::object' pointers, than it would be safe to use simple
pointers to 'Foo*'.

In the list structure as illustrated, a node has only a single
subsequent element, so it's not possible for a node to have multiple
children.  Nor is it possible to step through the list backwards.
Of course, it would be possible to use a doubly-linked list or
a tree instead.

>
> Ugrading to 2.0 is not easy, since different parts of software are using
> Bison, which is slightly modified too, and I have no knowledge whether
> it is going to impact those parts. It is an option, of course, that
> I will investigate.
>

In the long run, I think it's probably a good idea to upgrade,
whether you use '%destructor' or not.

Laurence


___
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison


Re[2]: memory leaks

2005-06-08 Thread Laurence Finston
On Wed, 8 Jun 2005, Laurence Finston wrote:

> If you only ever delete objects by means of their corresponding
> 'Object_Type::object' pointers, than it would be safe to use simple
> pointers to 'Foo*'.

Sorry, I meant "simple pointers to 'Foo'".

Laurence


___
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison


Re: bison 2.0 for windows

2005-06-08 Thread Hans Aberg
I do not know myself, but I have cc'ed the Bug-Bison list, to so it 
might get the developers attention. The thing is that GNU project are 
primarily for POSIX, or UNIX like, systems, and all else is extra. 
But if somebody willing to help making the effort to make such a 
Windows compile, it will surely be incorporated.


At 02:09 +0400 2005/06/08, hz kto wrote:

I wanted to get bison 2.0 to make use of %destructor ferature, but
there doesn't seem to be support for windows compilation from the looks
of the scripts and readme files. Or am I missing something?
In readme it says that DOS buils is probably broken right now.

Is anybody compiling for windows?

thanks in advance

Alex


___
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison



--
  Hans Aberg


___
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison


Output generation

2005-06-08 Thread Hans Aberg
There is a program, Cedric Lemaire, distributed under LGPL, specially 
designed for generating output from parser actions:

  http://www.codeworker.org
(From the newsgroup comp.compilers, "Re: simple code translator - 
suggestions?")


It might be fit into the context of generating skeleton files, as 
well as other uses. Guile could though be used to simplify the 
implementation of new parser algorithms as well.

--
  Hans Aberg


___
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison