- From: Gregg Kellogg <gregg@kellogg-assoc.com>
- Date: Thu, 18 Aug 2011 20:40:58 -0400
- To: "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
Received on Friday, 19 August 2011 00:41:46 UTC
I'm having some issues with the Turtle grammar [1], that may be my own or a misunderstanding, but I wanted to raise them:
Grammar production [7] seems to have a conflict
[7] predicateObjectList ::= verb objectList ( ";" verb objectList )* (";")?
I'm running into problems with statements such as the following:
:a :b :c ; .
This is because ';' is a first for both ( ";" verb objectList )* and (";")? The parser sees the ";" and starts down the verb objectList path only to find a ".", for which it fails. It would seem to require a look ahead, which would mean it is not an LL(1) grammar. SPARQL constructs this somewhat differently:
[72] PropertyListNotEmpty ::= Verb ObjectList ( ';' ( Verb ObjectList )? )*
The equivalent for turtle might be:
[7] predicateObjectList ::= verb objectList ( ";" ( Verb ObjectList)? )*
I'm not sure this would do it, but I might try it in on my own.
Gregg (Not a compiler expert) Kellogg
[1] http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/turtle.bnf
Received on Friday, 19 August 2011 00:41:46 UTC