shexSpec / shape-map

ShapeMap structure and language specification
MIT License
1 stars 3 forks source link

Relax shapeMap production in grammar #20

Open blake-regalia opened 4 years ago

blake-regalia commented 4 years ago

shapeMap ::= shapeAssociation (',' shapeAssociation)* would be a bit nicer for automation (i.e., shapeMap generators) if the , was also allowed at the very end of the document so that it behaves more like a terminator than a separator. This is a somewhat common practice in syntaxes.

Perhaps something like this? shapeMap ::= shapeAssociation (',' shapeAssociation?)*

ericprud commented 4 years ago

How about shapeMap ::= shapeAssociation (',' shapeAssociation)* ','? so there can only be one trailing ,, c.f. yacker example?

blake-regalia commented 4 years ago

Yep that works too