Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830713); site ubu.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!ukc!qtlon!flame!ubu!julia From: julia@ubu.UUCP (Julia Dain) Newsgroups: net.lang.c Subject: Re: Unknown what? Message-ID: <383@ubu.UUCP> Date: Fri, 1-Feb-85 05:52:32 EST Article-I.D.: ubu.383 Posted: Fri Feb 1 05:52:32 1985 Date-Received: Tue, 5-Feb-85 03:56:43 EST References: <189@wuphys.UUCP> <139200001@uiucdcsb.UUCP> Organization: Computer Science, Warwick University, UK Lines: 24 >what a crock. "most compilers spit out cryptic messages" -- mainly because >people are lazy about developing proper parsers. > When using a C compiler on a PC/AT w/XENIX, it spits out what it thinks >is missing. In a LALR language (e.g. C), you know what the expected followset >is supposed to be -- It would be possible to say what you expect to see at this >point (although that might be a little too much text). > If PCC would use be extended to use the Graham-Rhodes error recovery >to try and be a little more graceful about compiling, like the pascal (pc) >compiler does, I for one would be a happier grub. The pascal compiler uses Graham-Haley-Joy error recovery techniques, not Graham-Rhodes which is for shift reduce parsers. It does not seem possible to decouple these techniques from pc easily. Eyacc expects a bunch of special error recovery stuff in its input. The pc parser uses lexical and semantic analysis as well as syntactic analysis to guide its choice of error recovery. However I have produced a C compiler with improved error diagnostics based on the state information available in the parser. This is done with a new version of yacc, which can be used by any system currently using yacc, with minimal changes to specifications. The C compiler and yacc are available now; I am still writing up the paper. Julia Dain, Dept Computer Science, Univ of Warwick, Coventry CV47AL, U.K.