alwinb / url-specification

A rephrasing and generalisation of the WHATWG URL Standard
7 stars 0 forks source link

path-root can be \ #9

Open TimothyGu opened 3 years ago

TimothyGu commented 3 years ago

The grammar says

LHS ::= RHS
path-root ::= s
s ::= / }  —  in generic-mode
s ::= /\ }  —  in web-mode and in file-mode

so theoretically path-root can be \. However, in the URL Model section, there's a constraint that says

The path-root of an URL is the string /.

Is there anything that specifies (path-root \) are to be converted to (path-root /)?

TimothyGu commented 3 years ago

Insofar as it relates to converting grammar to structure, this may be part of #4.

alwinb commented 3 years ago

So true! I wondered if anyone would notice!

alwinb commented 3 years ago

Is there anything that specifies (path-root \) are to be converted to (path-root /)?

It should be converted to (path-root /) always, and no, I did not make that explicit. And yes it would be part of #4.

alwinb commented 3 years ago

I'm considering taking another hint from RFC3986, and write sections that mirror their chapter 2 (Characters) and 3 (Syntax components) before introducing the full grammar. And then don't do #4 formally, but just informal. Not sure yet.

Related to some of the discussion in #8. Suggestions/ ideas are welcome!