mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
* src/output.c (output): Don't free the grammar.
* src/reader.c (grammar_free): New. * src/main.c (main): Call it and don't free symtab here.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2002-03-04 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/output.c (output): Don't free the grammar.
|
||||||
|
* src/reader.c (grammar_free): New.
|
||||||
|
* src/main.c (main): Call it and don't free symtab here.
|
||||||
|
|
||||||
2002-03-04 Akim Demaille <akim@epita.fr>
|
2002-03-04 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
|
* src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
|
||||||
|
|||||||
@@ -103,13 +103,11 @@ main (int argc, char *argv[])
|
|||||||
/* Output the tables and the parser to ftable. In file output. */
|
/* Output the tables and the parser to ftable. In file output. */
|
||||||
output ();
|
output ();
|
||||||
|
|
||||||
/* Free the symbol table data structure. */
|
|
||||||
free_symtab ();
|
|
||||||
|
|
||||||
reduce_free ();
|
reduce_free ();
|
||||||
free_conflicts ();
|
free_conflicts ();
|
||||||
free_nullable ();
|
free_nullable ();
|
||||||
free_derives ();
|
free_derives ();
|
||||||
|
grammar_free ();
|
||||||
|
|
||||||
/* If using alloca.c, flush the alloca'ed memory for the benefit of
|
/* If using alloca.c, flush the alloca'ed memory for the benefit of
|
||||||
people running Bison as a library in IDEs. */
|
people running Bison as a library in IDEs. */
|
||||||
|
|||||||
@@ -1084,7 +1084,6 @@ output (void)
|
|||||||
output_token_translations ();
|
output_token_translations ();
|
||||||
output_gram ();
|
output_gram ();
|
||||||
|
|
||||||
XFREE (ritem);
|
|
||||||
if (semantic_parser)
|
if (semantic_parser)
|
||||||
output_stos ();
|
output_stos ();
|
||||||
output_rule_data ();
|
output_rule_data ();
|
||||||
@@ -1095,7 +1094,6 @@ output (void)
|
|||||||
/* Process the selected skeleton file. */
|
/* Process the selected skeleton file. */
|
||||||
output_skeleton ();
|
output_skeleton ();
|
||||||
|
|
||||||
free (rules + 1);
|
|
||||||
obstack_free (&muscle_obstack, NULL);
|
obstack_free (&muscle_obstack, NULL);
|
||||||
obstack_free (&format_obstack, NULL);
|
obstack_free (&format_obstack, NULL);
|
||||||
obstack_free (&action_obstack, NULL);
|
obstack_free (&action_obstack, NULL);
|
||||||
|
|||||||
11
src/reader.c
11
src/reader.c
@@ -1,5 +1,5 @@
|
|||||||
/* Input parser for bison
|
/* Input parser for bison
|
||||||
Copyright 1984, 1986, 1989, 1992, 1998, 2000, 2001
|
Copyright (C) 1984, 1986, 1989, 1992, 1998, 2000, 2001, 2002
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
@@ -1821,3 +1821,12 @@ reader (void)
|
|||||||
/* The grammar as a symbol_list is no longer needed. */
|
/* The grammar as a symbol_list is no longer needed. */
|
||||||
LIST_FREE (symbol_list, grammar);
|
LIST_FREE (symbol_list, grammar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
grammar_free (void)
|
||||||
|
{
|
||||||
|
XFREE (ritem);
|
||||||
|
free (rules + 1);
|
||||||
|
/* Free the symbol table data structure. */
|
||||||
|
free_symtab ();
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Input parser for bison
|
/* Input parser for bison
|
||||||
Copyright 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
@@ -27,8 +27,10 @@
|
|||||||
function (YYGUARD or YYACTION) which contains a switch statement to
|
function (YYGUARD or YYACTION) which contains a switch statement to
|
||||||
decide which guard or action to execute. */
|
decide which guard or action to execute. */
|
||||||
|
|
||||||
extern void reader PARAMS ((void));
|
void reader PARAMS ((void));
|
||||||
|
|
||||||
|
/* Free the packed grammar. */
|
||||||
|
void grammar_free PARAMS ((void));
|
||||||
|
|
||||||
extern int lineno;
|
extern int lineno;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user