mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-07-23 11:20:32 +00:00
c++: provide a means to clear symbols
The symbol destructor is currently the only means to clear a symbol. Unfortunately during error recovery we might have to clear the lookahead, which is a local variable (yyla) that has not yet reached its end of scope. Rather that duplicating the code to destroy a symbol, or rather than destroying and recreating yyla, let's provide a means to clear a symbol. Reported by Antonio Silva Correia, with an analysis from Michel d'Hooge. <http://savannah.gnu.org/support/?108481> * data/c++.m4, data/lalr1.cc (basis_symbol::clear, by_state::clear) (by_type::clear): New. (basic_symbol::~basic_symbol): Use clear.
This commit is contained in:
@@ -12,6 +12,7 @@ Andreas Schwab [email protected]
|
||||
Andrew Suffield [email protected]
|
||||
Angelo Borsotti [email protected]
|
||||
Anthony Heading [email protected]
|
||||
Antonio Silva Correia [email protected]
|
||||
Arnold Robbins [email protected]
|
||||
Art Haas [email protected]
|
||||
Baron Schwartz [email protected]
|
||||
@@ -85,6 +86,7 @@ Matt Rosing [email protected]
|
||||
Michael Felt [email protected]
|
||||
Michael Hayes [email protected]
|
||||
Michael Raskin [email protected]
|
||||
Michel d'Hooge [email protected]
|
||||
Michiel De Wilde [email protected]
|
||||
Mickael Labau [email protected]
|
||||
Mike Castle [email protected]
|
||||
|
||||
Reference in New Issue
Block a user