20 |
|
|
21 |
#include "system.h" |
#include "system.h" |
22 |
#include "getargs.h" |
#include "getargs.h" |
|
#include "xalloc.h" |
|
23 |
#include "files.h" |
#include "files.h" |
24 |
#include "gram.h" |
#include "gram.h" |
25 |
#include "state.h" |
#include "state.h" |
29 |
#include "LR0.h" |
#include "LR0.h" |
30 |
|
|
31 |
int any_conflicts = 0; |
int any_conflicts = 0; |
32 |
errs **err_table; |
errs **err_table = NULL; |
33 |
int expected_conflicts; |
int expected_conflicts; |
34 |
static char *conflicts; |
static char *conflicts = NULL; |
35 |
|
|
36 |
static unsigned *shiftset; |
static unsigned *shiftset = NULL; |
37 |
static unsigned *lookaheadset; |
static unsigned *lookaheadset = NULL; |
38 |
static int src_total; |
static int src_total; |
39 |
static int rrc_total; |
static int rrc_total; |
40 |
static int src_count; |
static int src_count; |
263 |
} |
} |
264 |
|
|
265 |
void |
void |
266 |
initialize_conflicts (void) |
solve_conflicts (void) |
267 |
{ |
{ |
268 |
int i; |
int i; |
269 |
|
|
457 |
`---------------------------------------------*/ |
`---------------------------------------------*/ |
458 |
|
|
459 |
void |
void |
460 |
print_conflicts (void) |
print_conflicts (FILE *out) |
461 |
{ |
{ |
462 |
int i; |
int i; |
463 |
|
|
477 |
|
|
478 |
if (verbose_flag) |
if (verbose_flag) |
479 |
{ |
{ |
480 |
obstack_fgrow1 (&output_obstack, _("State %d contains"), i); |
fprintf (out, _("State %d contains"), i); |
481 |
obstack_sgrow (&output_obstack, |
fputs (conflict_report (src_count, rrc_count), out); |
|
conflict_report (src_count, rrc_count)); |
|
482 |
} |
} |
483 |
} |
} |
484 |
} |
} |
736 |
|
|
737 |
|
|
738 |
void |
void |
739 |
finalize_conflicts (void) |
free_conflicts (void) |
740 |
{ |
{ |
741 |
XFREE (conflicts); |
XFREE (conflicts); |
742 |
XFREE (shiftset); |
XFREE (shiftset); |