shexSpec / shex

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

Annotations after shape label directly #96

Open labra opened 4 years ago

labra commented 4 years ago

The following shape parses:

<Shape> IRI // <label> "My shape" 
{
  <p> .
}

while the following doesn't:

<Shape> // <label> "My shape" 
{
  <p> .
}

Could we adapt the grammar to allow the last shape?

ericprud commented 4 years ago

That works and is a good idea. 2.2?

ericprud commented 4 years ago

Another possibility that reduces the incentive to allow

<Shape> // <label> "My shape"  { ... }

would be allowing leading annotations, e.g.

-- <label> "My shape"
<Shape> {
  -- <label> "My property"
  <p1> .
}

This would be nice 'cause it would cover triple expressions as well.

andrawaag commented 4 years ago

It becomes a feature request

ericprud commented 4 years ago

@labra , @hsolbrig , opinions? (I'm leaning towards the leading annotations solution.)