Re: RFC on Fragment Directives

> On Sep 5, 2019, at 10:26 AM, Julian Reschke <julian.reschke@gmx.de> wrote:
> 
> On 05.09.2019 19:09, Roy T. Fielding wrote:
>>> On Sep 5, 2019, at 9:37 AM, David Bokan <bokan@chromium.org
>>> <mailto:bokan@chromium.org>> wrote:
>>> 
>>> Hello all,
>>> 
>>> I'd like to get some broader feedback on the proposal of a "fragment
>>> directive". The basic idea is to encode a section of the URL fragment
>>> for "UA instructions". e.g.
>>> 
>>> https://example.org#fragment##fragment-directive
>>> <https://example.org/#fragment##fragment-directive>
>> 
>> Absolutely not. Only one # is allowed in a reference because some
>> implementations parse
>> left-to-right (correctly) and others parse right-to-left (incorrectly),
>> and there is absolutely
>> nothing you can say or do that will ever make that interoperable in
>> practice.
>> ...
> 
> Indeed.
> 
> But I wonder why exactly why parsing right-to-left would be incorrect?
> Can you explain why?

Because it is an LR(0) grammar and we get consistent error results if it
is parsed LR. Both directions are, of course, "correct" -- it's just that LR
parsing fails in a way that is more likely to be interoperable with sane
implementations and future ugly hacks.

....Roy

Received on Thursday, 5 September 2019 17:44:33 UTC