[Top][All Lists]

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

Re: Reductions during Bison error handling

From: Paul Hilfinger
Subject: Re: Reductions during Bison error handling
Date: Tue, 14 May 2002 14:13:59 -0700

PNH >2. Erroneous lookaheads are not distinguished from lookaheads for the
PNH >   most common reduction (an optimization that could apply equally
PNH >   well to LR(1) and LALR(1) parsers, as described in ASU, pp 244-245).
PNH >   This is the one I've been talking about here; it is orthogonal to
PNH >   the compression effected by the LALR construction.

HA > I was under the impression that Bison only uses 2 to present the parser,
HA > but it wasn't used in the actual parser implementation: The Bison parser
HA > would need a table with (token, action) pairs to be searched, and that 
HA > does not seem the case.

Sorry.  I wasn't referring to their discussion of using linked lists,
but rather to the last sentence:

    "Moreover, error entries can safely be replaced by error actions...."

which is the additional information-losing compression device that
Bison uses.

HA > So I think the efficient error recovery must include semantic information;

Yes, Corbett and others reached similar conclusions.  They would cite
examples like

         A(3) : f;

where in Ada, an appropriate replacement is A(3) := f; if A is an
array and f is a variable, and A(3) ; f; if A and f are procedures.

Paul Hilfinger

reply via email to

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