Hi Angelo, > Le 19 févr. 2014 à 14:39, Angelo Borsotti <[email protected]> a écrit > : > > Hi, > > when resolving conflicts due to %nonassoc, bison creates errs structures > attached to states to hold the terminals that must be treated by the > parsing engine as errors. At the same time, it removes the shift transitions > and the lookaheads in reductions that have such conflicts. > However, it seems that such errs structures have no effect: the parse tables > are the same as if the errs structures did non exist. > If that is the case, then they could be removed. > Is this correct?
This should help understand what is going on. Cheers! commit 5a778d8e0e7fc2de83e35083f92a02eca8e6f08e Author: Akim Demaille <[email protected]> Date: Sat May 2 08:05:26 2020 +0200 style: more documentation about errs Suggested by Angelo Borsotti. https://lists.gnu.org/r/bug-bison/2014-02/msg00003.html * src/state.h: here. diff --git a/src/state.h b/src/state.h index 8fd9088a..a087dc83 100644 --- a/src/state.h +++ b/src/state.h @@ -67,7 +67,10 @@ Conflict resolution can decide that certain tokens in certain states should explicitly be errors (for implementing %nonassoc). For each state, the tokens that are errors for this reason are - recorded in an errs structure, which holds the token numbers. + recorded in an errs structure. The generated parser does not + depend on this errs structure, it is used only in the reports + (*.output, etc.) to describe conflicted actions that have been + discarded. There is at least one goto transition present in state zero. It leads to a next-to-final state whose accessing_symbol is the
