Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ucla-cs!zen!ucbvax!decvax!ima!johnl From: johnl@ima.UUCP Newsgroups: comp.compilers Subject: Re: recursive-descent error recovery Message-ID: <664@ima.ISC.COM> Date: Sun, 16-Aug-87 12:37:29 EDT Article-I.D.: ima.664 Posted: Sun Aug 16 12:37:29 1987 Date-Received: Wed, 19-Aug-87 01:26:15 EDT References: <634@ima.ISC.COM> <642@ima.ISC.COM> <651@ima.ISC.COM> <655@ima.ISC.COM> Sender: johnl@ima.ISC.COM Reply-To: scott@cs.rochester.edu (Michael Scott) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 22 Approved: compilers@ima.UUCP In article <655@ima.ISC.COM> chuck@amdahl.amdahl.com (Charles Simmons) writes: | I claim it is impossible to write a reasonable compiler | using YACC. I base this claim on the fact that ... it is | impossible to produce reasonable error messages using YACC. Well, it's certainly difficult, but that's not because YACC is a bottom-up parser. It's because you're trying to do the error recovery by hand. Bernard Dion's thesis work at Wisconsin (with Charlie Fischer) demonstrated how to perform locally least-cost *automatic* error *correction* in bottom-up parsers, with modest space and negligible time overhead. [Compiler writer gives the parser generator a table of insertion and deletion costs for tokens; error corrector makes the least cost set of insertions and deletions that allows one more real token to be shifted.] Good quality corrections make pretty good error messages. Dion's techniques are incorporated in the ECP (error correcting parser) package distributed by Fischer's group. -- Michael L. Scott University of Rochester (716) 275-7745 scott@cs.rochester.edu scott%rochester@CSNET-RELAY {decvax, allegra, seismo, cmcl2}!rochester!scott -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request