Let's stop parser Hell

Roman D. Boiko rb at d-coding.com
Sat Jul 7 15:35:37 PDT 2012


On Saturday, 7 July 2012 at 22:25:00 UTC, David Piepgrass wrote:
> This is all true, but forgetting a brace commonly results in a 
> barrage of error messages anyway. Code that guesses what you 
> meant obviously won't work all the time, and phase 3 would have 
> to take care not to emit an error message about a "{" token 
> that doesn't actually exist (that was merely "guessed-in"). But 
> at least it's nice for a parser to be /able/ to guess what you 
> meant; for a typical parser it would be out of the question, 
> upon detecting an error, to back up four source lines, insert a 
> brace and try again.

So you simply admit that error recovery is difficult to 
implement. For me, it is a must-have, and thus throwing away 
information is bad.


More information about the Digitalmars-d mailing list