shexSpec / shex

ShEx language issues, including new features for e.g. ShEx2.1
25 stars 8 forks source link

Regular Expression BNF wrong #45

Closed gkellogg closed 7 years ago

gkellogg commented 7 years ago

The new stringFacet rule is:

[34]    stringFacet    ::=         stringLength INTEGER
                                          | "PATTERN" string
                                          | "~" string

However, string uses one of the STRING_LITERAL terminals, which is quoted. Instead, I suggest adding a new terminal:

[XX]    PATTERN               ::= "/" ([^#x2f#x5C#xA#xD] | '\\' [tbnrf\\/] | UCHAR)+ "/" [smixq]*

and using "~" PATTERN.

ericprud commented 7 years ago

updated -- now: [34] stringFacet ::= stringLength INTEGER | REGEXP https://shexspec.github.io/spec/#prod-stringFacet [63] ::= '/' ([^/\\n\r] | '\' [nrt\|.?+(){}$-[]^/] | UCHAR)+ '/' [smix] https://shexspec.github.io/spec/#term-REGEXP

PROPOSE: close REASON: fixed