W3C home > Mailing lists > Public > public-rdf-wg@w3.org > September 2013

Re: question about Trig spec

From: Sandro Hawke <sandro@w3.org>
Date: Wed, 18 Sep 2013 09:44:04 -0400
Message-ID: <5239AE24.4000607@w3.org>
To: Andy Seaborne <andy@apache.org>
CC: public-rdf-wg@w3.org
On 09/18/2013 09:07 AM, Andy Seaborne wrote:
>>>> On 16/09/13 13:39, Sandro Hawke wrote:
>>>>> - is it a bug that the grammar says (blankNodePropertyList |
>>>>> collection)
>>>>> can preceed { } but not if GRAPH is used?  How about getting rid of
>>>>> triples2 and instead change labelOrSubject to include alternatives
>>>>> blankNodePropertyList and collection?    I don't have a working
>>>>> grammar-driven-parser right now, so maybe I'm doing that wrong in my
>>>>> head.
>>>>
>>>> It was intentional as being the conservative choice.
>>>>
>>>> We did discuss
>>>>
>>>> GRAPH [:p 123 ; :q "" ] { ... }
>>>> [:p 123 ; :q "" ] { ... }
>>>>
>>>> but c.f.
>>>>
>>>> [:p 123 ; :q "" ] :predicate :object .
>>>>
>>>> the discussion did not result in an agreement.  Restricting the graph
>>>> name to a single term form, not a triple generating one, is the
>>>> conservative choice at this point in time.
>>>>
>>>
>>> I don't have any opinion about whether we should allow
>>>
>>> GRAPH [:p 123 ; :q "" ] { ... }
>>> and
>>> [:p 123 ; :q "" ] { ... }
>>>
>>> but as I read the grammar it seems to be saying we allow the second of
>>> those two, but not the first.  And that doesn't seem good.
>>>
>>> I agree the conservative route is to forbid this construction, but if
>>> so, I'd think we should forbid it in both forms.
>>
>> What derivation of rules allows
>>
>> [:p 123 ; :q "" ] { ... }
>>
>> ?
>>
>> A non [] blankNodePropertyList matches only:
>>
>> [4g]    triples2    ::=
>>      (blankNodePropertyList | collection) predicateObjectList? '.'
>>
>>
>> which must end in a '.'
>>
>> so
>>
>> [:p 123 ; :q "" ] .
>> { ... }
>>
>> is OK (bare Turtle, then a {} default graph part - ugly but hard to
>> avoid) but
>>
>> [:p 123 ; :q "" ] { ... }
>>
>> is not.
>>
>> Could provide a concrete example and the parse rules you are reading?
>
> Ping Sandro.
>
> (I have checked with a javacc parser and can not see how it can be 
> accepted by the grammar)
>

It looks like I made a mistake hand-reading the grammar, thanks.

         -- Sandro

>     Andy
>
>>
>>      Andy
>>
>>>
>>>        -- Sandro
>>>
>>>> It would apply if the word GRAPH were not used via triplesOrGraph
>>>> (caveat: I do not have my reference parser on this machine)
>>>>
>>>>     Andy
>>>>
>>>>>
>>>>> Thanks.
>>>>>
>>>>>         -- Sandro
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
Received on Wednesday, 18 September 2013 13:44:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:02:16 UTC