mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
* src/derives.h, src/derives.c (derives): A `rule_t***' instead of
`rule_number_t**'. (set_derives, free_derives): Rename as... (derives_compute, derives_free): this. Adjust all dependencies. * src/nullable.c (set_nullable, free_nullable): Rename as... (nullable_compute, nullable_free): these. (rule_list_t): Store rule_t *, not rule_number_t. * src/state.c (state_rule_lookaheads_print): Directly compare rule pointers, instead of their numbers. * src/main.c (main): Call nullable_free, and derives_free earlier, as they were lo longer used.
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -1,5 +1,5 @@
|
||||
/* Top level entry point of bison,
|
||||
Copyright 1984, 1986, 1989, 1992, 1995, 2000, 2001, 2002
|
||||
Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000, 2001, 2002
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
@@ -84,8 +84,8 @@ main (int argc, char *argv[])
|
||||
/* Record other info about the grammar. In files derives and
|
||||
nullable. */
|
||||
timevar_push (TV_SETS);
|
||||
set_derives ();
|
||||
set_nullable ();
|
||||
derives_compute ();
|
||||
nullable_compute ();
|
||||
timevar_pop (TV_SETS);
|
||||
|
||||
/* Convert to nondeterministic finite state machine. In file LR0.
|
||||
@@ -99,6 +99,11 @@ main (int argc, char *argv[])
|
||||
lalr ();
|
||||
timevar_pop (TV_LALR);
|
||||
|
||||
timevar_push (TV_FREE);
|
||||
nullable_free ();
|
||||
derives_free ();
|
||||
timevar_pop (TV_FREE);
|
||||
|
||||
/* Find and record any conflicts: places where one token of
|
||||
lookahead is not enough to disambiguate the parsing. In file
|
||||
conflicts. Also resolve s/r conflicts based on precedence
|
||||
@@ -152,8 +157,6 @@ main (int argc, char *argv[])
|
||||
states_free ();
|
||||
reduce_free ();
|
||||
conflicts_free ();
|
||||
free_nullable ();
|
||||
free_derives ();
|
||||
grammar_free ();
|
||||
|
||||
/* The scanner memory cannot be released right after parsing, as it
|
||||
|
||||
Reference in New Issue
Block a user