On 20 Mar 2007, at 20:46, Ramón García wrote:
As for the "Burke-Fisher Error Correction", error recovery is poor in
Bison because the LALR(1) algorithm may, when an error token appears
in the input, performed some reductions before the error is reported.
Perhaps I am wrong, but I think that these wrong reductions also
exists when using efficient (non cannonical) LR(1) implementations.
What they do is to apply the LALR(1) simplifications, but only when no
ambiguity is added. In particular, if a grammar is LALR(1), the
efficient LR(1) performs exactly the same shits and reductions.
I haven't looked too careful at these "efficient" LR(1).
If it is, as you suggest, that they still merge states in a way that
error tokens are not reported immediately but some reductions can
take place, then the ability of good error reporting, as well being
able to report interactively possible token completions are
properties that will be destroyed.
And adding LR(1) just in order to get a larger grammar class may not
be so important, in view of GLR applied to LALR(1).
Hans Aberg
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison