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