shexSpec / shex

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

Allow direct shapeExpression aliases #88

Open ericprud opened 5 years ago

ericprud commented 5 years ago

The ShEx 2.0 grammar included a construct to prevent a shapeExpression label from referring directly to another shapeExpression label, e.g.

<S1> @<S2>

The construct in question:

[10] shapeExpression ::= "NOT"? shapeAtomNoRef shapeOr?
                       | "NOT" shapeRef shapeOr?
                       | shapeRef shapeOr
[12] shapeOr         ::= ("OR" shapeAnd)+
                       | ("AND" shapeNot)+ ("OR" shapeAnd)*

These patches remove that restriction:

PROPOSE: accept this [pending] change for ShEx 2.1

ericprud commented 5 years ago

Note also that if we wanted to allow annotations/semActs on start rules without this change, we can't se shapeExpression directly:

- [6] | start | ::= | "start" '=' inlineShapeExpression
+ [6] | start | ::= | "start" '=' shapeAnd ("OR" shapeAnd)*