Skip to content
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

SPARQL Grammar: initial text direction; nested reified triples #153

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Conversation

afs
Copy link
Contributor

@afs afs commented Sep 12, 2024

This PR updates the SPARQL Grammar to include initial text direction syntax and functions. There is also a fix for nested reified triples.

This replaces the grammar changes in #113 in order to get all the SPARQL 1.2 grammar changes into the working draft.

The rest of #113 (updated) with the the function definitions will follow separately.

Initial text direction functions:

  • Functions isLang, isLangDir, LANGDIR, and STRLANGDIR.

Changes to reification:

  • Fix: allow reified triples to be nested.
  • Fix: remove production ReifiedTripleData (removal causes renumbering)

Preview | Diff

@afs afs force-pushed the grammar12 branch 2 times, most recently from 12923ad to 480cf20 Compare September 12, 2024 08:39
@afs afs added the spec:substantive Issue or proposed change in the spec that changes its normative content label Sep 12, 2024
@pchampin
Copy link
Contributor

pchampin commented Sep 12, 2024

This was discussed during the rdf-star meeting on 12 September 2024.

View the transcript

w3c/sparql-query#153

AndyS: line item 7, I did an update for grammar of query for 1.2 features.
… triple terms, annotation syntax, language directions.
… just the grammar, not the text or functions.
… believe it's reasonably complete.
… we should wait. difficult to review just grammar changes.
… hoping we could give it a week or so. then merge. then take corrections on that.


@afs
Copy link
Contributor Author

afs commented Sep 18, 2024

Updated with a fix for nested reified triples and including the effect of w3c/rdf-turtle#71 depending on how that issue being resolved (it only has a local effect on the grammar).

After this PR merges work to do includes:

  • a tidy-up pass over the grammar to find common definitions
  • align naming with Turtle where appropriate
  • reorder new rules
  • Use data-include= to move the grammar to a separate file. Downside: it does not display in PRs or locally (the same is true for Turtle which does use data-include=.

@gkellogg
Copy link
Member

It would be nice to have a text version of the grammar in the repo, similar to how Turtle does.

@afs
Copy link
Contributor Author

afs commented Sep 18, 2024

Should be possible. javacc produces a text form - the terminals need munging in a similar fashion to the HTML generating script (perl).

Later though - not this PR.

BTW The Turtle spec does not seem to have link to the text turtle.bnf file.

@gkellogg
Copy link
Member

No, it doesn’t right now. I’ll do a PR to add that link.

@afs afs merged commit 983486f into main Sep 21, 2024
2 checks passed
@afs afs deleted the grammar12 branch September 21, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:substantive Issue or proposed change in the spec that changes its normative content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants