- From: Eric Prud'hommeaux via GitHub <sysbot+gh@w3.org>
- Date: Thu, 23 Sep 2021 15:49:38 +0000
- To: public-shex-dev@w3.org
While we're dealing with this, I think we can have a bit more sanity checking by saying that the exclusions have to be homogeneous. As a counter example. consider ``` SheX foo:code [. - 'e'~ # no strings starting with 'e' - @en-UK # none of them Brittishisms ] ``` Does it permit this?: ``` turtle <s> foo:code <http://a.example> . ``` The grammar would imply that it does but when you ShExJ-ify it, you find otherwise. With homogenous exclusions, we can reflect the ShExJ. You could still state the above, but you'd need two terms in the valueSet: ``` ShEx foo:code [ . -'a'~ -'e'~ -'i'~ -'o'~ -'u'~ # strings, except those starting with vowels . -@en-UK -@fr # none of them Brittishisms, and nothing French ] ``` Here's what ShExJS uses (which passes the tests): ``` valueSetValue: iriRange | literalRange | languageRange | '.' (iriExclusion+ | literalExclusion+ | languageExclusion+) iriRange: iri ('~' iriExclusion*)? iriExclusion: '-' iri '~'? literalRange: literal ('~' literalExclusion*)? literalExclusion: '-' literal '~'? languageRange: LANGTAG ('~' languageExclusion*)? | '@' '~' languageExclusion* languageExclusion: '-' LANGTAG '~'? ``` Which lines up with <https://github.com/shexSpec/grammar/blob/master/ShExDoc.g4#L149-L161>. PROPOSE: adopt the ANTLR productions for valueSetValue, -- GitHub Notification of comment by ericprud Please view or discuss this issue at https://github.com/shexSpec/spec/issues/42#issuecomment-925938602 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 23 September 2021 15:49:40 UTC