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

GH-157, GH-158: Rules for reified triple subject and object parts #159

Merged
merged 3 commits into from
Oct 13, 2024

Conversation

afs
Copy link
Contributor

@afs afs commented Sep 29, 2024

Copy link
Member

@rubensworks rubensworks left a comment

Choose a reason for hiding this comment

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

It may be useful to also add your script (or some documentation) to generate the HTML from the BNF in case someone else would change it in the future.

spec/sparql.bnf Outdated Show resolved Hide resolved
spec/sparql.bnf Outdated Show resolved Hide resolved
spec/sparql.bnf Outdated Show resolved Hide resolved
spec/sparql.bnf Outdated Show resolved Hide resolved
@gkellogg
Copy link
Member

There are a number of other places where the sparql.bnf either contains <br/> or terminals of the form <INTEGER>, which aren't part of the EBNF syntax.

@afs
Copy link
Contributor Author

afs commented Sep 30, 2024

It may be useful to also add your script (or some documentation) to generate the HTML from the BNF in case someone else would change it in the future.

Sure - actually, it's alwas been available in the Jena grammar area and is part of a Jena release. The RDF 1.2 is in a development area ATM because I don'#t feel it is stable enough to put in a release.

The process isn't BNF to HTML though. The material is in a JavaCC file which itself is processed to exclude local extensions. Having the JavaCC file is helpful because the grammar is quite large and JavaCC is performing checking, both that rules names do actually tie up and that the grammar is LL(1) and it check for LALR(1), no JavaCC parsing features. It runs the W3C tests on the parser so Ruben's contribution on rdf-tests is great to see.

JavaCC itself produces a text file. This is munged into HTML with hrefs, links, HTML escapes into a table. The terminals are manually managed to control whether they get inlined or not, and because there are some escaping and quote choices to make.

There is now a script to do the same to produce W3C BNF (one or two things to fix still but getting there).

This may not be the best way to get text BNF. Extracting the text from the HTML works reasonable well (e.g htmlq - any other recommendations?) and that would mean just one set of transforms.

Regardless, the primary grammar is the HTML in the spec document.

@afs afs force-pushed the reifier-grammar-updates branch from 6f86fdf to c52f216 Compare September 30, 2024 20:38
@afs
Copy link
Contributor Author

afs commented Sep 30, 2024

There are a number of other places where the sparql.bnf either contains <br/> or terminals of the form <INTEGER>, which aren't part of the EBNF syntax.

Fixed.

spec/sparql.bnf Outdated Show resolved Hide resolved
@afs
Copy link
Contributor Author

afs commented Oct 10, 2024

This is ready and will be more readable when in the document.

It is some fixes rather than brand new material.

@afs afs merged commit 6f8c0d7 into main Oct 13, 2024
2 checks passed
@afs afs deleted the reifier-grammar-updates branch October 13, 2024 17:39
@afs afs mentioned this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants