aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/bison/src/main.c
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-08-11 11:42:23 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-08-11 11:54:06 +0300
commitcd788243496b69e548998f9e3f9ff80e34977652 (patch)
tree0fd50f566b69bc2cfd0d9c4c18eea1b77d5ec276 /contrib/tools/bison/src/main.c
parentc7230d56fb1b7998da0edb829f1751640da9c8b4 (diff)
downloadydb-cd788243496b69e548998f9e3f9ff80e34977652.tar.gz
Update contrib/tools/bison to 3.7.6
583623e1fb299df0a04a0aecdc47eb759ef412b9
Diffstat (limited to 'contrib/tools/bison/src/main.c')
-rw-r--r--contrib/tools/bison/src/main.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/tools/bison/src/main.c b/contrib/tools/bison/src/main.c
index 9b93742787..63856fed1c 100644
--- a/contrib/tools/bison/src/main.c
+++ b/contrib/tools/bison/src/main.c
@@ -1,7 +1,7 @@
/* Top level entry point of Bison.
Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2002, 2004-2015,
- 2018-2020 Free Software Foundation, Inc.
+ 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -16,7 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include "system.h"
@@ -33,10 +33,12 @@
#include "complain.h"
#include "conflicts.h"
+#include "counterexample.h"
#include "derives.h"
#include "files.h"
#include "fixits.h"
#include "getargs.h"
+#include "glyphs.h"
#include "gram.h"
#include "ielr.h"
#include "lalr.h"
@@ -44,6 +46,7 @@
#include "muscle-tab.h"
#include "nullable.h"
#include "output.h"
+#include "parse-gram.h"
#include "print-graph.h"
#include "print-xml.h"
#include "print.h"
@@ -74,6 +77,7 @@ main (int argc, char *argv[])
atexit (close_stdout);
+ glyphs_init ();
uniqstrs_new ();
muscle_init ();
complain_init ();
@@ -135,6 +139,9 @@ main (int argc, char *argv[])
conflicts_update_state_numbers (old_to_new, nstates_old);
free (old_to_new);
}
+ if (report_flag & report_cex
+ || warning_is_enabled (Wcounterexamples))
+ counterexample_init ();
conflicts_print ();
timevar_pop (tv_conflicts);
@@ -208,11 +215,15 @@ main (int argc, char *argv[])
reduce_free ();
conflicts_free ();
grammar_free ();
+ counterexample_free ();
output_file_names_free ();
- /* The scanner memory cannot be released right after parsing, as it
- contains things such as user actions, prologue, epilogue etc. */
+ /* The scanner and parser memory cannot be released right after
+ parsing, as it contains things such as user actions, prologue,
+ epilogue etc. */
gram_scanner_free ();
+ parser_free ();
+
muscle_free ();
code_scanner_free ();
skel_scanner_free ();