Let's stop parser Hell

Jacob Carlborg doob at me.com
Tue Jul 10 23:41:53 PDT 2012


On 2012-07-10 22:53, Jonathan M Davis wrote:

> Well, giving an error, continuing to parse, and giving a partial result can be
> useful (and you give a prime example of that), but "fixing" the problem (e.g by
> inserting the semicolon) and not considering it to be an error would be a
> _huge_ mistake IMHO. And that's essentially what happens with HTML.

No, that is _not_ what happens with HTML. With HTML, the browser _do 
not_ output the error and continues as if it was valid could. As far as 
I know, up until HTML 5, the spec hasn't mentioned what should happen 
with invalid code.

This is just a error handling strategy that is an implementation detail. 
It will not change what is and what isn't valid code. Are you preferring 
getting just the first error when compiling? Fix the error, compile 
again, get a new error and so on.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list