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: Akim Demaille
Subject: Re: How to free symbols during error recovery
Date: Fri, 08 Oct 2004 14:41:36 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

>>> "Laurence" == Laurence Finston <address@hidden> writes:

 >> Again, I'm not taking _at all_ about error recovery :)

 > I don't understand.  I'm talking about destroying objects when they
 > are popped from the stack, which happens when parse errors occur.

Parse error != error recovery.

But maybe you wrote this sentence before the following one which was
above in your answer:

 > I've been assuming that when the `error' token isn't used anywhere,
 > `yyparse()' just returns 1 right away, without popping states from
 > the stack.  It just occurred to me that this might not be the case.

It is not, indeed.




 > In other cases, I don't need a destructor because, like Oliver, I
 > take care of allocating and freeing memory by hand.  If I'm missing
 > something here, please explain it.

You don't seem to _need_ it, but I think you want it.





reply via email to

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