Related articles |
---|
Parser Error Detection and Recovery georgev@fiu.edu (1991-03-21) |
Parser error detection and recovery snyder@CHILDE.CS.NYU.EDU (1991-03-22) |
Re: Parser Error Detection and Recovery arnold@audiofax.com (1991-03-22) |
Re: Parser Error Detection and Recovery rekers@cwi.nl (1991-03-25) |
Re: Parser Error Detection and Recovery djones@megatest.com (1991-03-25) |
Re: Parser Error Detection and Recovery scott@bbxsda.UUCP (1991-03-28) |
Re: Parser Error Detection and Recovery megatest!djones@decwrl.dec.com (1991-04-01) |
Parser error detection and recovery julia@cs.warwick.ac.uk (Julia Dain) (1991-04-10) |
Newsgroups: | comp.compilers |
From: | Julia Dain <julia@cs.warwick.ac.uk> |
Keywords: | parse, LR, errors, yacc |
Organization: | Compilers Central |
References: | <9103211951.AA01615@fiu.edu> |
Date: | Wed, 10 Apr 91 14:09:33 BST |
This is another response to the request by Vincent George for information
on error recovery in LR parser generators.
Sorry it is rather late, I have not been able to read news for a few
weeks.
My PhD thesis `Automatic Error Recovery for LR Parsers in Theory and
Practice' (University of Warwick, Coventry, UK, 1990) contains
descriptions of 2 methods for automatic error recovery. These are not
based on error productions. Both were implemented for yacc and used to
build several different parsers, including for C and Pascal, which were
tested on collections of student C and Pascal programs. The first method
attempts a single token change to the input first; if this "failed"
(criterion was, could the parser accept N more tokens, where N was
parameterized for different versions) a phrase-level recovery based on
replacement of input by a goal non-terminal takes place. The second
method is based on the concept of minimum distance - it constructs several
possible repairs, from the state information at point of detection of
error, and chooses the one at minimum distance from the actual input.
As John Levine mentioned, there has been a lot of stuff published in this
area. Other error recovery schemes which have been incorporated into
parser generators have been described by
Roehrich; Fischer, Milton and Quiring; Anderson and Backhouse;
Sippu and Soisalon-Soininen; Spenke et al; Boullier and Jourdan;
Gray; Koskimies et al.
I have got a large bibliography on syntax error handling for LR parsers if
anyone is interested.
I have also written a survey article (submitted for publication...)
--
Julia Dain, Dept Computer Science, University of Warwick, Coventry CV4 7AL, UK
julia@cs.warwick.ac.uk Phone +44 203 523364 Fax +44 203 525714
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.