Closed Tpt closed 3 years ago
Thanks @Tpt for spotting that.
Either we integrate your test-case, or maybe we could do for Trig and Turtle was was alreadt done for Turtle and N-Triples, namely to duplicate the tests of the "subset" language into the testsuite of the "superset" language... But that's a lot a redundancy to maintain if we do that :-/
The production rule [3g-star]
that you propose unfortunately does not work, as it allows an embedded triple in the subject position... It should rather look like:
[3g-star] triplesOrGraph ::= labelOrSubject (wrappedGraph | predicateObjectList '.') | embTriple predicateObjectList '.'
The TriG-star tests already include many Turtle-star tests, including https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#trig-star
:s :p :o .
<<:s :p :o>> :q 123 .
Also, the TriG-star section does say that it uses the Turtle-star productions and does not reference a complete (or partial) TriG grammar directly (@Tpt where did you take your grammar from?). The section should be updated to be more explicit on the grammar used, including something like @pchampin mentioned. As it is, it seems that, although there are tests, simply saying to use the Turtle-star grammar doesn't account for these parser paths.
The production rule [3g-star] that you propose unfortunately does not work, as it allows an embedded triple in the subject position... It should rather look like:
Yes, indeed. Your grammar looks much better. Thank you!
Also, the TriG-star section does say that it uses the Turtle-star productions and does not reference a complete (or partial) TriG grammar directly (@Tpt where did you take your grammar from?).
I am using the RDF 1.1 TriG grammar on which I applied the Turtle-star grammar modification. I assumed it was what the working draft was suggesting as the expected "TriG-star" grammar.
The section should be updated to be more explicit on the grammar used, including something like @pchampin mentioned. As it is, it seems that, although there are tests, simply saying to use the Turtle-star grammar doesn't account for these parser paths.
Yes, it would be amazing! There also seems to be no explicit TriG-star test at the moment with annotated triples in the default graph. Rio passes all TriG-star test with just the Turtle-star grammar modification applied to the parser (thanks to @pchampin). However it fails on the test I provided.
Yes, it would be amazing! There also seems to be no explicit TriG-star test at the moment with annotated triples in the default graph. Rio passes all TriG-star test with just the Turtle-star grammar modification applied to the parser (thanks to @pchampin). However it fails on the test I provided.
The example I referenced above has an embedded triple in the subject position in the default graph. If you're referring to the annotation syntax, https://w3c.github.io/rdf-star/tests/trig/syntax/#turtle-star-ann-1 is in the default graph.
PREFIX : <http://example/>
:s :p :o {| :r :z |} .
But, the one mentioned in https://github.com/w3c/rdf-star/issues/187#issuecomment-860071126 seems to match your test case.
If you're referring to the annotation syntax, https://w3c.github.io/rdf-star/tests/trig/syntax/#turtle-star-ann-1 is in the default graph.
Thank you! I did not thought about using Turtle-star tests to test our TriG-star parser. Sorry for the noise.
The SPARQL-star testsuite provides TriG-star files like:
However, these files does not seem to be supported by the current TriG-star grammar.
Indeed, the root rules or Trig grammar are:
and none of them produces something like
embTriple predicateObjectList '.'
if we apply the TriG-star modification.Here is a sample test case that does not pass if TriG-star grammar is implemented naïvely:
With
trig_nested_triple.trig
:And
trig_nested_triple.nq
:A simple solution is maybe to update
into something like