w3c / rdf-turtle

https://w3c.github.io/rdf-turtle/
Other
4 stars 4 forks source link

Unused NIL production rule in Turtle (and TriG) grammar #58

Closed marcelotto closed 3 weeks ago

marcelotto commented 2 months ago

While updating RDF.ex on the latest RDF 1.2 spec changes, I noticed that both the grammars of Turtle and TriG include a production rule for a NIL terminal, defined as follows:

[45] NIL ::= '(' WS* ')'

However, this NIL production rule does not seem to be used anywhere else in the grammars of both specifications.

gkellogg commented 1 month ago

The RDF 1.1 version of the Turtle Spec does not define a NIL terminal, although the TriG spec does define (but not otherwise use) NIL. IIRC, it came when reconciling the grammars with SPARQL, where it is also defined and used.

Unless there is some other reason to keep the terminal definition, it can be removed from both Turtle and TriG.