[data-shapes] Pull Request: #482 path grammar

VladimirAlexiev has just submitted a new pull request for https://github.com/w3c/data-shapes:

== #482 path grammar ==
Related to #482, here are 2 variants:

- plantuml
  - pros: can automate with make file, the base case `predicate` comes first
  - cons: worse rendering, ugly EBNF source (took some staring at https://plantuml.com/ebnf to write it), have to put it in 1 line
```
@startEbnf
path = predicate | "(", {path}-, ")" | "[", ("sh:inversePath"|"sh:alternativePath"|"sh:zeroOrMorePath"|"sh:oneOrMorePath"), path, "]" ;
@endEbnf
```
![](https://raw.githack.com/vladimirAlexiev/data-shapes/refs/heads/issue-482-path-grammar/shacl12-core/images/path-EBNF.svg)

- rr
  - pros: better rendering (I like the yellow), easy to write source, can split in multiple lines
  - made by hand at https://www.bottlecaps.de/rr/ui (check SVG, uncheck Embedded, download), need to build & deploy to automate;
the base case `predicate` is shown second and I can't control that
```
path ::= predicate | 
  '(' path* ')' | 
  '[' ('sh:inversePath'|'sh:alternativePath'|'sh:zeroOrMorePath'|'sh:oneOrMorePath') path ']'
```
![](https://raw.githack.com/vladimirAlexiev/data-shapes/refs/heads/issue-482-path-grammar/shacl12-core/images/path-EBNF-rr.svg)


See https://github.com/w3c/data-shapes/pull/483


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 7 August 2025 14:03:57 UTC