[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reductions during Bison error handling
From: |
Hans Aberg |
Subject: |
Re: Reductions during Bison error handling |
Date: |
Tue, 14 May 2002 23:49:11 +0200 |
At 14:13 -0700 2002/05/14, Paul Hilfinger wrote:
>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.
Yes, but I was under the impression that that was a part of the LALR
algorithm, see Aho et al, p. 240: "However, when presented with an
erroneous input, the LALR parser may proceed to do some reduction after the
LR parser has declared an error..."
>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.
So I finally got to understand what his "semantic parser" is about: I
figure it is error recovery based on semantic information.
Hans Aberg
- Re: Reductions during Bison error handling, (continued)
- Re: Reductions during Bison error handling, Richard Stallman, 2002/05/14
- Re: Reductions during Bison error handling, Hans Aberg, 2002/05/14
- Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/13
- Re: Reductions during Bison error handling, Hans Aberg, 2002/05/13
- Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/13
- Re: Reductions during Bison error handling, Hans Aberg, 2002/05/14
- Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/14
- Re: Reductions during Bison error handling,
Hans Aberg <=
- Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/14
- Re: Reductions during Bison error handling, Hans Aberg, 2002/05/15
- Re: Reductions during Bison error handling, Akim Demaille, 2002/05/20
- Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/21
- Re: Reductions during Bison error handling, Akim Demaille, 2002/05/20
Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/10
Re: Reductions during Bison error handling, Paul Hilfinger, 2002/05/10