Re: [whatwg] URL interop status and reference implementation demos

On 11/18/2014 06:37 PM, Domenic Denicola wrote:
>
>> As a final note, the reference implementation has a list of known
>> differences from the published standard:
>>
>> intertwingly.net/projects/pegurl/url.html
>
> Hmm, so this isn't really a reference implementation of the published
> standard then? Indeed looking at the code it seems to not follow the
> algorithms in the spec at all :(. That's a bit unfortunate if the
> goal is to test that the spec is accurate.

Let me help by connecting the dots.

Bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=25946 is open to 
rewrite the URL parser.  Comment 8 and 9 endorse the following work in 
progress:

http://intertwingly.net/projects/pegurl/url.html

Just today, I integrated my Anolis to Bikeshed work, which is a 
prerequisite for completing this.

The reference implementation is a faithful attempt to implement the 
reworked parsing logic.  In fact, parts of the specification and parts 
of the reference implementation are generated from a single file:

https://raw.githubusercontent.com/rubys/url/peg.js/url.pegjs

Hopefully shortly this all will land in the live version of the spec, 
meanwhile it attempts to "skate to where the puck will be".  In each 
case of a known difference in published results, I've linked to 
rationale for the change (generally to an indication that Anne agrees).

I hope this helps.

- Sam Ruby

Received on Tuesday, 18 November 2014 23:45:18 UTC