Skip to content

VladimirAlexiev/grammar-diagrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grammar Railroad Diagrams

Intro

Reading EBNF grammars is not easy. Seeing it on a “rail-road” diagram makes it easier to understand the grammar.

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 Compact

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

SHACL Rules

Proposed SHACL Rules grammar for SHACL Compact by Andy Seaborne: https://raw.githack.com/w3c/data-shapes/initial-infer-rules/shacl12-inf-rules/index.html#shapes-rules-grammar

Preview:

./shacl-rules-preview.png

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