|origin of "panic mode" firstname.lastname@example.org (Carl Cerecke) (2003-04-13)|
|Re: origin of "panic mode" email@example.com (J.H.Jongejan) (2003-04-15)|
|Re: origin of "panic mode" firstname.lastname@example.org (Stan Zaborowski) (2003-04-15)|
|Re: origin of "panic mode" email@example.com (2003-04-20)|
|Re: origin of "panic mode" firstname.lastname@example.org (Norman Worth) (2003-05-16)|
|Re: origin of "panic mode" email@example.com (Paul Robinson) (2003-06-20)|
|Date:||20 Apr 2003 17:50:51 -0400|
|Posted-Date:||20 Apr 2003 17:50:51 EDT|
Carl Cerecke wrote:
> In any case, it would be good to be able to cite the source of the
> term "panic mode" if anybody knows what it is.
I don't have a source, but I have a possible etymology. On a lot of
old systems there was "panic mode recovery" when something had gone
wrong and there wasn't enough information to be sure that a given
recovery action would work, or that it wouldn't cause more errors in
the future. In a panic, for example, the system might grab a page of
memory to use to keep track of pointers while it rebuilt its memory
allocation table -- and hope that the page it had grabbed had been
unoccupied at that moment.
But that wound up not being a good idea most of the time. When
panicky systems occasionally did more damage than they prevented, or
when they did things that corrupted resource allocation data and
caused later crashes, they eventually went out of style. The
increased complexity has resulted in more stringent correctness
requirements of the individual parts, and "panic mode recovery"
outside of a few sharply restricted environments like lexing just
isn't appropriate anymore.
Throwing away characters until you find a well-formed token is a form
of "panic mode recovery" in that sense, because it may be correct, but
it may cause declarations to be missed or confuse the parser -- not
enough is known once you've done a panic-mode recovery to assure that
it doesn't cause spurious further errors. So I'm guessing that this
error recovery strategy may have been named that by way of comparison
to other "panic mode recovery" systems in use at the time.
But as to where it came from? I couldn't tell you. If I wanted a
citable source as to what it is I'd use the Dragon Book, which gives
an excellent definition of the technique and discussion of it.
[Back in the olden days of batch systems, parsers often tried very
hard to repair broken syntax so they could diagnose as many errors as
possible in a single run. These days there's not much point, since
you usually present each error to the user for repair immediately.
Return to the
Search the comp.compilers archives again.