Skip to content

VladimirAlexiev/grammar-diagrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grammar Railroad Diagrams

Intro

Reading EBNF grammars is not easy. Seeing it on a diagram makes things easier. https://rr.red-dove.com/ui is an excellent tool: it can scrape EBNF grammars from W3C specs, generates either a single XHTML with embedded SVG, or a zip with many PNGs, cross-links the definitions and usages.

  • INCOMPLETE: ./ebnf2tdv.pl: convert ebnf to a list of node-node connections, for visualizing eg with d3

Table of Contents

SPARQL Query and Update

I use this quite often while writing SPARQL. It is bit hard to understand: use this for reference, but not for learning SPARQL.

SPARQL 1.1 Railroad Diagram

SPARQL 1.1 is the current version of SPARQL.

Preview:

./SPARQL-diagram-preview.png

SPARQL 1.2 Railroad Diagram

SPARQL 1.2 is the long-awaited update of SPARQL with SPARQL-star (reified triples and annotations). It’s still a work in progress.

Preview:

./SPARQL-1.2-diagram-preview.png

SPARQL-star Railroad Diagram

This is an older incarnation of SPARQL-star. You can ignore it.

Preview:

./SPARQL-star-diagram-preview.png

Chunked SPARQL Diagram

Here’s a chunked diagram, which however is partial: Discussion whether there’s a chunked generator. Preview:

http://1.bp.blogspot.com/_5Jqup-kC5TY/SVCGV19T6EI/AAAAAAAAALA/7UW3FznkRHM/s1600/SPARQL.png

SHACLC

SHACL Compact grammar

Preview:

./SHACLC-diagram-preview.png

IMPORTANT: The SHACL CG is currently working on extending the SHACLC grammar with more features. You can see diagrams for 4 candidate grammars at https://github.com/VladimirAlexiev/shacl/tree/shaclc-grammars/shacl-compact-syntax/grammar#candidate-shacl-c-grammars

XSPARQL

XSPARQL is a melding of XQuery and SPARQL. Its syntax is pretty large, so the diagrams help. https://github.com/VladimirAlexiev/xsparql/blob/master/doc/:

Preview:

./XSPARQL-diagram-preview.png

About

Grammar Railroad Diagrams for SPARQL, XSPARQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages