SPARQL EBNF?

56 views
Skip to first unread message

Nicholas Car

unread,
Jul 5, 2022, 10:07:54 PM7/5/22
to rdflib-dev
Dear RDFlibbers,

Does anyone have either a plain EBNF grammar for SPARQL or a Lark Python grammar file for it?

I am trying to build up a canonical more modern PEG for SPARQL to perhaps slot in to RDFLib.

I see W3C EBNF SPARQL grammars out there, e.g. https://github.com/dundalek/GrammKit/blob/master/examples/sparql.ebnf, but not 'pure' EBNF and I can't find a Lark implementation.

If I really can't find one, I'm going to have to either convert the W3C EBNF to plain EBNF and use something like Tatsu (https://pypi.org/project/TatSu/) or convert straight to a Lark Python grammar and use Lark as I need a Python SPARQL grammar checker.

Any other suggestions for SPARQL grammar use in Python welcome!

Thanks, Nick

Iwan Aucamp

unread,
Jul 20, 2022, 7:11:30 AM7/20/22
to rdfli...@googlegroups.com
Hi Nic,

Not sure about the quality of these, and they are not exactly EBNF, but there is:


They may be easy to convert to EBNF.

Iwan Aucamp


--
http://github.com/RDFLib
---
You received this message because you are subscribed to the Google Groups "rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/HwfN2AUiWR1-5X5X2JGX4NmRvCIJxO6AYOdnTsk7hHYw2n0nzy4TjrKlyDyWBQQ4f7f74aqDk0uKnrRc2-xqQdl-jQNHWD7kdbfN3HStMvY%3D%40kurrawong.net.
Reply all
Reply to author
Forward
0 new messages