- else if (sprec[i] > redprec)
- {
- log_resolution (state, lookaheadnum, i, _("shift"));
- *fp1 &= ~mask; /* flush the reduce for this token */
- }
- else
- {
- /* Matching precedence levels.
- For left association, keep only the reduction.
- For right association, keep only the shift.
- For nonassociation, keep neither. */
-
- switch (sassoc[i])
- {
- case RIGHT_ASSOC:
- log_resolution (state, lookaheadnum, i, _("shift"));
- break;
-
- case LEFT_ASSOC:
- log_resolution (state, lookaheadnum, i, _("reduce"));
- break;
-
- case NON_ASSOC:
- log_resolution (state, lookaheadnum, i, _("an error"));
- break;
- }
-
- if (sassoc[i] != RIGHT_ASSOC)
- {
- *fp2 &= ~mask; /* flush the shift for this token */
- flush_shift (state, i);
- }
- if (sassoc[i] != LEFT_ASSOC)
- {
- *fp1 &= ~mask; /* flush the reduce for this token */
- }
- if (sassoc[i] == NON_ASSOC)
- {
- /* Record an explicit error for this token. */
- *errtokens++ = i;
- }
- }
- }