Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!decvax!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: Re: error recovery Message-ID: <510@lakart.UUCP> Date: 24 Apr 89 20:34:59 GMT References: <4389@goofy.megatest.UUCP> Organization: Lakart Corporation, Newton, MA Lines: 23 djones@megatest.UUCP (Dave Jones) sez: > Why? For one thing, error-recovery in a recursive descent parser is even > trickier than in an LR parser! The hell it is!!! I suggest you dig out the source of the PDP 11, V6 UNIX C compiler. Written in C, without YACC, uses recursive descent, and does error recovery so gracefully, and correctly, it is a pleasure to use. It requires one longjmp call to recover, but with the exception of a for loop (which could generate a spurious error about imbalanced parentheses, due to overloading the ';' operator) it never made a mistake. Would that pcc, the GreenHills family etc. could do the same. I'd suggest that all these guys talk to Leor Zohlman, the writer of BDS-C. I suspect that he uses RD, whatever the case I rate his error recovery way above _ANYTHING_ I have come across in UNIX since the V6 days. Are you listening guys???? -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+