[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errs structures in states

From: Akim Demaille
Subject: Re: Errs structures in states
Date: Sat, 2 May 2020 08:07:39 +0200

Hi Angelo,

> Le 19 févr. 2014 à 14:39, Angelo Borsotti <address@hidden> 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.


commit 5a778d8e0e7fc2de83e35083f92a02eca8e6f08e
Author: Akim Demaille <address@hidden>
Date:   Sat May 2 08:05:26 2020 +0200

    style: more documentation about errs
    Suggested by Angelo Borsotti.
    * 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]