Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: error recovery Message-ID: <4597@goofy.megatest.UUCP> Date: 29 Apr 89 01:21:47 GMT References: <510@lakart.UUCP> Organization: Megatest Corporation, San Jose, Ca Lines: 57 From article <510@lakart.UUCP>, by dg@lakart.UUCP (David Goodenough): > 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!!! > Watch your language. (And lower your voice.) There's programmers in the audience. Some of us are trying to sleep. > 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. I'd love to. Where can I dig it out? > It requires one longjmp call to recover, Ahah! See previous posting. > 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. True. I would prefer that these two just stop on the first error. That's the only message I ever read, anyway. (The subject of error-recovery, as applied to compilers, is becoming increasingly moot. It was important when it took a day or more to get a listing back from the sysop, but now that you can retry a compilation in a matter of a few seconds, it's mostly accademic.) > 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???? Attentively. I would also be interested in people's opinions on the best parser generator utilities, both LL and LR. Should we move this party over to comp.compilers? > > dg@lakart.UUCP - David Goodenough +---+ > Love that name! Yours truly, Dave "Highly Adequate" Jones.