]> git.saurik.com Git - bison.git/blobdiff - src/conflicts.c
* tests/regression.at, tests/torture.at, tests/calc.at: Adjust to
[bison.git] / src / conflicts.c
index a9ea208ad4114a04739d0857949be9d1bc834b1a..6f6ea882d3cba5013a8ca0ab3a8312f2151ea1de 100644 (file)
@@ -276,7 +276,7 @@ count_rr_conflicts (int state)
       int count = 0;
       int j;
       for (j = m; j < n; j++)
       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)
          count++;
 
       if (count >= 2)
@@ -401,7 +401,14 @@ conflicts_print (void)
 
   if (expected_conflicts != -1 && !src_ok)
     {
 
   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),
       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;
 print_reductions (FILE *out, int state)
 {
   int i;
-  int j;
   int m;
   int n;
   shifts *shiftp;
   int m;
   int n;
   shifts *shiftp;
@@ -463,8 +469,6 @@ print_reductions (FILE *out, int state)
     }
   else if (n - m >= 1)
     {
     }
   else if (n - m >= 1)
     {
-      int k;
-
       int cmax = 0;
       int default_LA = -1;
       int default_rule = 0;
       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;
        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];
 
            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++)
        {
 
       for (i = 0; i < ntokens; i++)
        {
+         int j;
          int defaulted = 0;
          int count = BITISSET (shiftset, i);
 
          for (j = m; j < n; 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)
                    {
                {
                  if (count == 0)
                    {