Re: "error handling and recovery" in compilers. (Nick Maclaren)
2 Jan 2004 03:43:56 -0500

          From comp.compilers

Related articles
"error handling and recovery" in compilers. (RERA) (2003-12-27)
Re: "error handling and recovery" in compilers. (2004-01-02)
Re: "error handling and recovery" in compilers. (Ingo Dittmer) (2004-01-02)
Re: "error handling and recovery" in compilers. (Chris F Clark) (2004-01-07)
Re: "error handling and recovery" in compilers. (Ingo Dittmer) (2004-01-18)
| List of all articles for this month |

From: (Nick Maclaren)
Newsgroups: comp.compilers
Date: 2 Jan 2004 03:43:56 -0500
Organization: University of Cambridge, England
References: 03-12-144
Keywords: errors
Posted-Date: 02 Jan 2004 03:43:56 EST

RERA <> wrote:
>I googled around in search of materials related to "error handling and
>recovery" in compilers. Very few :(.
>I would like to know is there some document related "error handling
>and recovery" which teaches me how to implement and how to test it
>?. Is there any testsuites/document which tests/teaches "error
>handling and recovery" mechanism of a compiler .
>I would be happy if some one throws light.
>[We've been discussion error recovery here during the past week, and it
>seems clear that the state of the art is not great. -John]

Sigh, yes. And it is better in compilers than in most software :-(

In most cases, looking at older compilers and/or older books might
help, because things used to be better. Still not great, but better.
For example, take two issues:

When a compiler detects a bracketting mismatch (in the most general
sense, including unterminated strings and mis/un-declared names),
only a few tell the user both whether the error was detected AND where
it should have matched. So we have to use binary chop to detect the
ormer. Why? It is exactly the sort of thing a compiler has in its
syntax trees, or could trivially add.

One indication of a well-engineered software product is that most of
its errors are detected by the product, which produces a message like
"Compiler error detected; evidence in .weeble; please contact authors."
This used to be fairly common, but is now common in only a very few
compilers. It is particularly relevant to optimisation, where the
opportunity (and need) for such detection is greatest.

But blowed if I know where to read up on such techniques, even though
that have been known about for 50 years.

Nick Maclaren.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.