- From: Gregg Kellogg <gregg@greggkellogg.net>
- Date: Sat, 15 Jun 2013 15:13:47 -0700
- To: Gavin Carothers <gavin@carothers.name>
- Cc: Andy Seaborne <andy@apache.org>, RDF-WG <public-rdf-wg@w3.org>
- Message-Id: <E4E8BC34-369F-418A-A630-2B245F644678@greggkellogg.net>
On Jun 15, 2013, at 2:36 PM, Gavin Carothers <gavin@carothers.name> wrote:
> Yay! dvcs is back up
>
> https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html#grammar-ebnf
>
> Examples are back, blank nodes are allowed for graph names, all the references are fixed.
Great thanks. I updated the test suite to allow a trailing ',' or ';', and optional '.' as the last tripleBlock. This affected two tests, which were turned from negative syntax to positive syntax tests.
Gregg
> On Sat, Jun 15, 2013 at 2:13 PM, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> On Jun 15, 2013, at 12:54 PM, Andy Seaborne <andy@apache.org> wrote:
>
> > The TriG showed up one issue with the TriG grammar.
> >
> > In "traditional" TriG, and in SPARQL and N3, the final DOT in a {...} is optional making this legal:
> >
> > { :s :p :o }
> >
> > It is illegal by the current TriG grammar which requires a trailing DOT
> >
> > Two bad syntax tests show this:
> >
> > ** trig-syntax-bad-struct-08
> > ----
> > # No DOT
> > {<http://example/s> <http://example/p> <http://example/o>}
> > ----
> >
> > ** trig-syntax-bad-struct-11
> > ----
> > # Trailing ;
> > {<http://example/s> <http://example/p> <http://example/o> ;}
> > ----
> > because in Turtle
> >
> > <s> <p> <o>; .
> >
> > is legal turtle (it's quite useful for repeated lines to always terminate with ";" and not have to worry about the last line being special -- the Turtle test manifest uses this).
> >
> >
> > The grammar rule affected is TriG [3g]
> >
> > Currently:
> > [3g] graph ::= graphIri? '{' (triples '.')* '}'
> >
> > A change would be:
> >
> > [3g] graph ::= graphIri? '{' triplesBlock? '}'
> > [] triplesBlock ::= triples ('.' triplesBlock?)?
> >
> > which is recursive; it is at least contained to a single rule -- it's how SPARQL 1.0 writes it so it should be reasonable for everyone.
> >
> > Andy
>
> +1
>
> I also did a minor update to allow BlankNode graph names:
>
> [3g] graph ::= graphName "{" (triples ".")* "}" | "{" (triples ".")* "}"
> [4g] graphName ::= iri | BlankNode
>
> Gregg
>
> > PS This not not new - see also, from Gregg:
> >
> > http://lists.w3.org/Archives/Public/public-rdf-comments/2011Dec/0012.html
> >
> > there, [6] allows multiple adjacent DOTs:
> >
> > [6] triples ::=
> > subject predicateObjectList ( "." ( subject predicateObjectList)? )*
> >
> > matches
> >
> > :s :p :o1 .... :s :p :o2 ..
>
>
> Wow, I had forgotten about this.
>
>
>
Received on Saturday, 15 June 2013 22:14:17 UTC