johnl@ima.UUCP (08/18/87)
I claim (hoping to be provocative :-}) that when a parser encounters a syntax error, the only sensible thing to do is to "call the liveware" (i.e., the user) to patch up the token stream before continuing processing. Remember, the point of error recovery is not to generate correct object code (or would YOU release a program whose source contained syntax errors, even if they were correctly patched up by the compiler?); rather, the point is to allow the compilation run to continue, catching as many errors as possible, so that the user can fix them all at once. This approach made a lot of sense when we were lining up at the card reader; these days, it doesn't. Comments? [We're not lining up at the card reader, true enough, but I often type "make" and go to lunch; I'd rather come back to see how it did rather than see it say "Trivial typo on line 2, would you like to fix it?" Interactive compiling and debugging enviroments have their uses, but just running the compilation through is often just as useful. -John] -- Jim Shankland ..!ihnp4!cpsc6a!\ rtech!jas ..!ucbvax!mtxinu!/ -- 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