Unknown what?
Julia Dain
julia at ubu.UUCP
Fri Feb 1 20:52:32 AEST 1985
>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.
More information about the Comp.lang.c
mailing list