mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* src/gram.h (associativity): New enum type which replaces the
former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with `right_assoc', `left_assoc' and `non_assoc'. Adjust all dependencies. * src/reader.c: Formatting changes. (LTYPESTR): Don't define it, use it as a literal in `reader_output_yylsp'. * src/symtab.h (symbol_class): New enum type which replaces the former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with `sunknown', `stoken and `snterm'.
This commit is contained in:
@@ -131,29 +131,29 @@ resolve_sr_conflict (int state, int lookaheadnum)
|
||||
|
||||
switch (sassoc[i])
|
||||
{
|
||||
case RIGHT_ASSOC:
|
||||
case right_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("shift"));
|
||||
break;
|
||||
|
||||
case LEFT_ASSOC:
|
||||
case left_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("reduce"));
|
||||
break;
|
||||
|
||||
case NON_ASSOC:
|
||||
case non_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("an error"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (sassoc[i] != RIGHT_ASSOC)
|
||||
if (sassoc[i] != right_assoc)
|
||||
{
|
||||
*fp2 &= ~mask; /* flush the shift for this token */
|
||||
flush_shift (state, i);
|
||||
}
|
||||
if (sassoc[i] != LEFT_ASSOC)
|
||||
if (sassoc[i] != left_assoc)
|
||||
{
|
||||
*fp1 &= ~mask; /* flush the reduce for this token */
|
||||
}
|
||||
if (sassoc[i] == NON_ASSOC)
|
||||
if (sassoc[i] == non_assoc)
|
||||
{
|
||||
/* Record an explicit error for this token. */
|
||||
*errtokens++ = i;
|
||||
|
||||
Reference in New Issue
Block a user