Re: [svgwg] Fix missing trailing wsp after path commands (#778)

I totally agree with you that a shorter grammar definition would be helpful to spec implementer. It took me three iterations banging my head on a wall to start having a reasonable understanding of the path grammar. I would love to have seen issue #751 earlier to avoid that 😋. FWIW I would support a shorter, cleaner, version of the grammar either in the next iteration of the SVG Spec or within the dedicated [Path Spec](https://svgwg.org/specs/paths/).

For that fix, the first suggestion I made was a direct inspiration from SVG 1.1, but I really like your suggestion to shorten this PR. However, I'm not super at ease with nesting parenthesis. This is one of this case that make things a little harder to process for a human brain (at least, mine)

I was considering something like this (yes, still an additional symbol):

```
svg_path::= wsp* (moveto wsp* drawto_command_group*)?
drawto_command_group::= (drawto_command wsp*)+
```

There is also the option to add a `wsp*` symbol at the end of each command definition and simplify the grammar to:

```
svg_path::= wsp* (moveto drawto_command*)?
```


-- 
GitHub Notification of comment by JeremiePat
Please view or discuss this issue at https://github.com/w3c/svgwg/pull/778#issuecomment-593983789 using your GitHub account

Received on Tuesday, 3 March 2020 14:39:08 UTC