Re: Inline data

On 30/04/12 13:12, Eric Prud'hommeaux wrote:

> This seems like a balance between consistency and convenience. It's
> grammatically distinguishable in LL/LALR(1) with this patch:
>
> -[29]  DataBlock  ::=      Var*     '{' ( '(' DataBlockValue* ')' | NIL )* '}'
> +[29]  DataBlock  ::=  '(' Var* ')' '{' ( '(' DataBlockValue* ')' | NIL )* '}'
>                      |      Var      '{'       DataBlockValue*              '}'
 >
 > IMO, it actually adds some consistency by sticking parens around the
 > var list.


Rest assured that the worked example is also a working example!  I added 
the feature as an extension to ARQ and it parses OK (including for the 
GraphPatternNotTriples which is the more senstive-to-change area).

(Speculative thoughts from here)

 > One problem with "DATA" is that SPARQL's data is RDF triples, not
 > variable bindings. Practically, we may some day want to add premises
 > like:

Using the FROM clause would seem good here:

 >    DATA { :Fido a :Dog }
 >    SELECT ?mammal { ?mammal a :Mammal }

SELECT ?mammal { ?mammal a :Mammal }
FROM DATA { :Fido a :Dog }

or

SELECT ?mammal { ?mammal a :Mammal }
FROM { :Fido a :Dog }

	Andy

Received on Monday, 30 April 2012 12:28:08 UTC