X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b32ba448c85a41a75e9ef9b22c1f22f944eebdf4..e89a22bfab22e4d2ee73be49dcb66b51f8d0e892:/src/conflicts.c diff --git a/src/conflicts.c b/src/conflicts.c index a9ea208a..6f6ea882 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -276,7 +276,7 @@ count_rr_conflicts (int state) int count = 0; int j; for (j = m; j < n; j++) - if (BITISSET (LA (m), j)) + if (BITISSET (LA (j), i)) count++; if (count >= 2) @@ -401,7 +401,14 @@ conflicts_print (void) if (expected_conflicts != -1 && !src_ok) { - complain_message_count++; + /* FIXME: BIG ATTROCIOUS HACK. For flames, complaints and so + on, see Bruno Haible. GNU Gettext's plural.y's %expect is + wrong, and newer Bison reject it. But then, Bruno will be + overwhelmed by bug reports, until a fixed Gettext is + released. So for the 1.3x generation only, we leave a puke + puke hack. */ + if (!strsuffix (infile, "plural.y")) + complain_message_count++; fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n", "expected %d shift/reduce conflicts\n", expected_conflicts), @@ -414,7 +421,6 @@ void print_reductions (FILE *out, int state) { int i; - int j; int m; int n; shifts *shiftp; @@ -463,8 +469,6 @@ print_reductions (FILE *out, int state) } else if (n - m >= 1) { - int k; - int cmax = 0; int default_LA = -1; int default_rule = 0; @@ -473,6 +477,7 @@ print_reductions (FILE *out, int state) for (i = m; i < n; i++) { int count = 0; + int j, k; for (k = 0; k < tokensetsize; ++k) lookaheadset[k] = LA (i)[k] & ~shiftset[k]; @@ -501,12 +506,13 @@ print_reductions (FILE *out, int state) for (i = 0; i < ntokens; i++) { + int j; int defaulted = 0; int count = BITISSET (shiftset, i); for (j = m; j < n; j++) { - if (BITISSET (LA (m), j)) + if (BITISSET (LA (j), i)) { if (count == 0) {