[imps] Standardizing "parse error" messages

Henri Sivonen hsivonen at iki.fi
Mon Jan 12 11:19:10 PST 2009

On Jan 12, 2009, at 21:07, Edward Z. Yang wrote:

> Ryan King wrote:
>> I think this is a good idea, too. Just keeping the ruby and python  
>> ports
>> in sync is hard enough.
> Where might a good place for this standardization to take place be?  
> I'm
> somewhat inclined to say it should go in the actual spec, but that's
> difficult to say.

The problem with standardizing error messages is that it forbids  
competition by providing better error messages.

For example, the Validator.nu HTML Parser maintains tokenizer state  
that is unnecessary for parsing per se but useful for error messages.  
(The particular bit of state is the source position of the ampersand  
when parsing something that might turn out to be a character reference.)

I think the Validator.nu HTML Parser shouldn't be in violation of the  
spec for doing this, but also parsers that don't want to spend cycles  
for maintaining message-only state shouldn't be required to.

Henri Sivonen
hsivonen at iki.fi

More information about the Implementors mailing list