Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!sri-spam!ames!sdcsvax!ucbvax!decvax!ima!johnl From: johnl@ima.istc.sri.com Newsgroups: comp.compilers Subject: Re: error recovery in yacc Message-ID: <706@ima.ISC.COM> Date: Fri, 4-Sep-87 10:42:31 EDT Article-I.D.: ima.706 Posted: Fri Sep 4 10:42:31 1987 Date-Received: Fri, 11-Sep-87 07:23:56 EDT References: <689@ima.ISC.COM> Sender: johnl@ima.ISC.COM Reply-To: harvard!seismo!sun!academ!nuchat!steve (Steve Nuchia) Organization: Public Access - Houston, Tx Lines: 33 Approved: compilers@ima.UUCP Summary: error recovery for binary licensed yacc In article <689@ima.ISC.COM>, gupta%cs.unc.edu@RELAY.CS.NET (Gopal Gupta) writes: > About 1-2 years ago someone at UNC-Chapel Hill did a study > of error recovery mechanism in YACC. The paper is titled > "Error Recovery in LR Parsing: A Case Study Using YACC" For those interrested in coaxing acceptable error handling out of yacc without being able to hack the source or having to digest academic papers (not that it would hurt you...) there is hope. _Introduction_to_Compiler_Construction_with_Unix_ Schreiner and Friedman, Prentice-Hall, ISBN 0-13-474396-2 This is a usable tutorial introduction to getting results from lex/yacc. I bought it to learn the tools, since they had resisted attack using just the unix manuals. The book is organized around the evolution of a C subset compiler (roughly small-C) which I have since extended and retargeted and I'm using it to generate code for my architecture simulation. Anyway, they include simple yacc source construction rules for error recovery and a simple modification to /usr/lib/yaccpar that you can make at home. The result is truly usable error handling, better than a lot of commercial compilers. -- Steve Nuchia {soma,academ}!uhnix1!nuchat!steve (713) 334 6720 -- 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