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