mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
* src/symtab.c (symbol_free): Remove dead deactivated code:
type_name are properly removed.
Don't use XFREE to free items that cannot be NULL.
* src/struniq.h, src/struniq.c: New.
* src/main.c (main): Initialize/free struniqs.
* src/parse-gram.y (%union): Add astruniq member.
(yyprint): Adjust.
* src/scan-gram.l (<{tag}>): Return a struniq.
Free the obstack bit that used to store it.
* src/symtab.h (symbol_t): The 'type_name' member is a struniq.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "mbswidth.h"
|
||||
#include "complain.h"
|
||||
#include "quote.h"
|
||||
#include "struniq.h"
|
||||
#include "getargs.h"
|
||||
#include "gram.h"
|
||||
#include "reader.h"
|
||||
@@ -301,7 +302,8 @@ splice (\\[ \f\t\v]*\n)*
|
||||
"<"{tag}">" {
|
||||
obstack_grow (&string_obstack, yytext + 1, yyleng - 2);
|
||||
YY_OBS_FINISH;
|
||||
yylval->string = last_string;
|
||||
yylval->struniq = struniq_new (last_string);
|
||||
YY_OBS_FREE;
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user