Closed labra closed 7 years ago
I voted 👍 but I think the ShExC BNF grammar (and the ANTLR) still need to be updated to reflect the change.
Currently, we have production 34.
[34] stringFacet ::= stringLength INTEGER
| "PATTERN" string
| "~" string
and I suppose it should be something like:
[34] stringFacet ::= stringLength INTEGER
| "~" "/" pattern "/" flags
where pattern
and flags
should also be defined.
yep, i did this in my impl:
[25] stringFacet ::= stringLength INTEGER
| REGEXP
- | "PATTERN" string
- | '~' string # shortcut for "PATTERN"
+[63] REGEXP ::= '/' ([^#x2f#x5C#xA#xD] | '\\' [tbnrf\\/] | UCHAR)* '/' [smix]*
which allows for repetition of flags but is pretty good otherwise. The edits are pretty small for spec/index.html and grammar/* so I didn't bother to create branches for them.
The
pattern
facet in the current spec doesn't have support for the flags optional parameter.The issue has already been detected as appears in the specification so adding this issue here is just to unify the issues in a single place.
How could we represent flags in the compact syntax?