help-bison
[Top][All Lists]
Advanced

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

Re: How to free symbols during error recovery


From: Laurence Finston
Subject: Re: How to free symbols during error recovery
Date: Thu, 7 Oct 2004 18:16:41 +0200 (MEST)

On Thu, 7 Oct 2004, Oliver Boris Fischer wrote:

> Thank you for your very detailed mail.

You're welcome.

> If I am not able to get
> %destructor working I will give it a try.

If you can get `%destructor' to work, and it does what you want it to,
my advice would be to use it.  If you choose to use my approach, it could,
of course, be refined.  For one thing, clearing and refilling the linked
list could be put into functions.

The reason I don't want to use `error' is because I want to be able to
determine the place from which I continue parsing.  I also don't
require very much context from the stack, since the parameter I pass to
`yyparse()' stores all the information about the state of the
program that I need for parsing.

If you don't mind using C++, using a `vector<A*>' instead of a linked list
would make things simpler.  I also like being able to write `A*' instead
of `struct A*', but that's trivial.

Laurence







reply via email to

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