Implementation Report for Ruby LD Patch implementation

I’ve completed an implementation of a Linked Data Patch Format processor in Ruby, compatible with the RDF.rb suite.

github: https://github.com/ruby-rdf/ld-patch
gem: https://rubygems.org/gems/ld-patch
earl report: https://raw.githubusercontent.com/ruby-rdf/ld-patch/develop/etc/earl.ttl
earl report (as HTML+RDFa): https://htmlpreview.github.com/?https://github.com/ruby-rdf/ld-patch/blob/develop/etc/earl.html

As noted in the README on GitHub, this implementation uses a small variation on the EBNF Grammar:

* The INDEX terminal was removed in favor of using INTEGER. As both INDEX and INTEGER can match the same terminals, it lead to an ambiguity that my LL(1) processor could not handle properly.
* The graph production is changed as follows:

[18] graph ::= triples ('.' triples?)*

This has the advantage of being context free, although does allow for repeated ‘.’ at the end of a graph, which certain tests ported from Turtle check for.

The original production:

[18] graph ::= triples ( '.' triples )* '.’?

is not context free, as ‘.’ is in the FIRST of two different productions; I think it should be replaced in the version I used for the grammar to be context free.

This is a stand-alone processor, and needs to be integrated with an LDP server to be useful, such as https://github.com/ruby-rdf/rdf-ldp.

Gregg Kellogg
gregg@greggkellogg.net

Received on Monday, 24 August 2015 05:36:31 UTC