mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
Reductions in web2c.y are improperly reported.
Reported by Mike Castle. * src/conflicts.c (print_reductions): Fix. * tests/regression.at (Web2c): New.
This commit is contained in:
@@ -414,7 +414,6 @@ void
|
||||
print_reductions (FILE *out, int state)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int m;
|
||||
int n;
|
||||
shifts *shiftp;
|
||||
@@ -463,8 +462,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 +470,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 +499,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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user