Re: [whatwg/url] Consider railroad diagrams in syntax sections to aid understanding (#67)

> The non-terminals can also not contain links.

Linking in non-terminals is something I've meant to address for quite a while. There's an old PR from plinss to add this that I need to review and edit.

> It's not clear the first railroad is "decimal byte", it's not clear the second railroad is "IPv4 address",

Yeah, you use headings for that, or dt/dd, etc.  What are you expecting the diagram itself to do here?

> Railroad diagrams also add inline style I'm not too happy with.

It adds one style block if you use any railroad diagrams, and which can be suppressed via the `Boilerplate` metadata if you want to supply your own styles. The alternative is I put the styles in the default stylesheet, but then (a) all specs get that extra style weight, even if they dont' use any disagrams, and (b) anybody using their own stylesheets (like WHATWG) won't get it unless they manually copy things into their own stylesheet (and then they won't get updates unless they carefully watch the repo).

What specifically makes you unhappy about it?

> I think I was hoping for something closer to ABNF, but without the ABNF implications that you can then stick that into some parser generator.

Yeah, I've long wanted to allow a more grammar-ish type of definition, mainly so I could just drop in CSS grammars and get a diagram out.  I've got an open bug for implementing a parser for some variant of BNF (so you get autolinking and syntax highlighting), and if that ever gets resolved, using it for diagrams wouldn't be hard.

-- 
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/67#issuecomment-254970738

Received on Wednesday, 19 October 2016 23:35:16 UTC