[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error handling.

> Hi, dudes!
> I've got a query about error handling. It is not mentioned in the manual.
> How do we handle errors in sablecc, that is, how can you manage to handle 
> the errors so that we store all the messages on an array and only when the 
> source program was fully parsed we display all the error messages ?
> Thanks,
> Fidel Viegas.

My experience -- with many compilers over many decades -- is that this
is not a good idea.  It is best to write out messages as soon as errors
are detected, and flush the buffer after each one.  Many Many times
I've had a compiler crash for one reason or another (parhaps because of
an inconsistent state caused by the very error it detected)
and as a result the messages are lost.

> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com