]> git.saurik.com Git - bison.git/blob - src/conflicts.h
Flag glr tests.
[bison.git] / src / conflicts.h
1 /* Find and resolve or report lookahead conflicts for bison,
2 Copyright (C) 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
3
4 This file is part of Bison, the GNU Compiler Compiler.
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef CONFLICTS_H_
20 # define CONFLICTS_H_
21 # include "state.h"
22
23 void conflicts_solve (void);
24
25 /**
26 * Update state numbers recorded in internal arrays such that:
27 * - \c nstates_old is the old number of states.
28 * - Where \c i is the old state number, <tt>old_to_new[i]</tt> is either:
29 * - \c nstates_old if state \c i is removed because it is unreachable.
30 * - The new state number.
31 * - The highest new state number is the number of remaining states - 1.
32 * - The numerical order of the remaining states has not changed.
33 */
34 void conflicts_update_state_numbers (state_number old_to_new[],
35 state_number nstates_old);
36
37 void conflicts_print (void);
38 int conflicts_total_count (void);
39 void conflicts_output (FILE *out);
40 void conflicts_free (void);
41
42 /* Were there conflicts? */
43 extern int expected_sr_conflicts;
44 extern int expected_rr_conflicts;
45 #endif /* !CONFLICTS_H_ */