- {
- if ((mask & *fp2 & *fp1) && sprec[i])
- /* Shift-reduce conflict occurs for token number i
- and it has a precedence.
- The precedence of shifting is that of token i. */
- {
- if (sprec[i] < redprec)
- {
- log_resolution (state, lookaheadnum, i, _("reduce"));
- *fp2 &= ~mask; /* flush the shift for this token */
- flush_shift (state, i);
- }
- 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. */
+ if (BITISSET (LA (lookaheadnum), i)
+ && BITISSET (lookaheadset, i)
+ && sprec[i])
+ /* Shift-reduce conflict occurs for token number i
+ and it has a precedence.
+ The precedence of shifting is that of token i. */
+ {
+ if (sprec[i] < redprec)
+ {
+ log_resolution (state, lookaheadnum, i, _("reduce"));
+ /* flush the shift for this token */
+ RESETBIT (lookaheadset, i);
+ flush_shift (state, i);
+ }
+ else if (sprec[i] > redprec)
+ {
+ log_resolution (state, lookaheadnum, i, _("shift"));
+ /* flush the reduce for this token */
+ RESETBIT (LA (lookaheadnum), i);
+ }
+ else
+ {
+ /* Matching precedence levels.
+ For left association, keep only the reduction.
+ For right association, keep only the shift.
+ For nonassociation, keep neither. */