- From: Alexis Hunt <notifications@github.com>
- Date: Fri, 16 Oct 2020 14:28:38 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/issues/479/710656895@github.com>
It's not supported by vanilla BNF, but I would personally be quite satisfied with a grammar taking parameterized rules like you have there. Many modern parser generators can handle them; those that cannot, it is relatively easy to split out the (small number of) parameters here. On Wed, 14 Oct 2020 at 11:33, Alwin Blok <notifications@github.com> wrote: > This might be a more complicated problem than you think. I have tried > several times, but the scheme dependent behaviour causes a lot of duplicate > rules, so you end up with a grammar that is not very concise nor easy to > read. And there is a tricky problem with repeated slashes before the host, > the handling of which is base URL dependent. > > I have some notes on it here > <https://github.com/alwinb/reurl/blob/master/doc/grammar.md>. (I > eventually went with a hybrid approach of a couple of very simple grammars > and some logic rules in between). This ties into a model of URLs that I > describe here <https://github.com/alwinb/reurl/blob/master/doc/theory.md>. > > What's the status of this? It really does work. I developed the theory > when I tried to write a library that supports relative URLs. I am quite > confident that it matches the standard (but not everything is described in > the notes); as the library now passes all of the parsing tests. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/whatwg/url/issues/479#issuecomment-708482325>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AE7AOVLPC5M2RVBAW3GK3UDSKXAFHANCNFSM4MQOLQEA> > . > -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/479#issuecomment-710656895
Received on Friday, 16 October 2020 21:28:50 UTC