Open VladimirAlexiev opened 3 months ago
It has been a long time, since I had done it, but I will try to remember
@tw-osthus Thank you very much for your explanations, this is good text that can provide justifications for such features in a spec.
Can you think of any other features that I've missed?
Have you decide on what complexity the grammar should be?
SPARQL is LL(1), which is simple in tech terms. It is compatible with LALR(1) there are parser generators for every programming ecosystem freely available.
Is there a tool to analyze complexity? I found only Grammophone but it doesn't support EBNF: https://github.com/mdaines/grammophone/issues/50
After https://github.com/GuntherRademacher/ebnf-convert/issues/8 was fixed, I was able to process shaclc-XText: https://rawgit2.com/VladimirAlexiev/shacl/shaclc-grammars/shacl-compact-syntax/grammar/shaclc-XText.html
It's much richer than the other candidate grammars, so @tw-osthus can you help us understand it and list all its features? Does such overview already exist? Maybe you have a report or paper with your proposed additions?
I'll tag not just @jeswr but also @HolgerKnublauch and @afs since some of these ideas seem worthy to do in SHACL as well.
Here's what I was able to see from a quick browse, but I understand no more than half of it:
subject, property, object
, these rules use Construct, and have an "IF" part (being a shape to check) and PRIORITY"""<sparql query>"""
)xone, xor
), use graphical operators (eg><, ⊻, ⩒
)