Skip to content

GH-236: Symmetric RDF triple terms #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2025
Merged

GH-236: Symmetric RDF triple terms #238

merged 1 commit into from
Jun 21, 2025

Conversation

afs
Copy link
Contributor

@afs afs commented Jun 18, 2025

This closes #236.

Only the grammar table and BNF file are changed by this PR.

Make triple patterns "symmetric RDF" by adding TripleTerm as shown below:

From the BNF diff:

-ReifiedTripleSubject      ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriple
+ReifiedTripleSubject      ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriple | TripleTerm
-TripleTermSubject         ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode
+TripleTermSubject         ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm
-TripleTermDataSubject     ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral
+TripleTermDataSubject     ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | TripleTermData
-ExprTripleTermSubject     ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var
+ExprTripleTermSubject     ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm

Preview | Diff

@afs afs force-pushed the symmetric-triple-terms branch from 3123ee8 to 52f9895 Compare June 18, 2025 19:24
@afs
Copy link
Contributor Author

afs commented Jun 18, 2025

The preview and the diff are not seeing the TripleTermDataSubject change but it is in index.html and sparql.bnf as noted in comments below.

(PS After updating the common files, the preview and diff are being recreated.)

@@ -11717,7 +11717,7 @@ <h3>Grammar</h3>
<td><code>[123]&nbsp;&nbsp;</code></td>
<td><code><span class="doc-ref" id="rTripleTermDataSubject">TripleTermDataSubject</span></code></td>
<td>&nbsp;&nbsp;::=&nbsp;&nbsp;</td>
<td><code class="gRuleBody"><a href="#riri">iri</a> | <a href="#rRDFLiteral">RDFLiteral</a> | <a href="#rNumericLiteral">NumericLiteral</a> | <a href="#rBooleanLiteral">BooleanLiteral</a></code></td>
<td><code class="gRuleBody"><a href="#riri">iri</a> | <a href="#rRDFLiteral">RDFLiteral</a> | <a href="#rNumericLiteral">NumericLiteral</a> | <a href="#rBooleanLiteral">BooleanLiteral</a> | <a href="#rTripleTermData">TripleTermData</a></code></td>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TripleTermDataSubject change.

TripleTermObject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm
TripleTermData ::= '<<(' TripleTermDataSubject ( iri | 'a' ) TripleTermDataObject ')>>'
TripleTermDataSubject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral
TripleTermDataSubject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | TripleTermData
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TripleTermDataSubject change.

@afs afs requested review from kasei, rubensworks and hartig June 18, 2025 20:09
@afs afs mentioned this pull request Jun 19, 2025
@afs afs force-pushed the symmetric-triple-terms branch from 52f9895 to 83699c3 Compare June 19, 2025 10:15
@afs afs merged commit 3c6eb59 into main Jun 21, 2025
2 checks passed
@afs afs deleted the symmetric-triple-terms branch June 21, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReifiedTripleSubject, TripleTermSubject, TripleTermDataSubject and ExprTripleTermSubject rules allow literals but not triple terms
4 participants