Whitespace in Turtle after ^^

Hi, I somehow have come over some "evil" Turtle that seems to be on the form:

<http://example.com/s2> <http://example.com/p> "false"^^
<http://www.w3.org/2001/XMLSchema#boolean> .

(One word: PHP)


Now, as bad style as this might look - I could not figure out from the
RDF Turtle 1.1 grammar why it shouldn't be valid.


http://www.w3.org/TR/turtle/#grammar-production-RDFLiteral

[128s] RDFLiteral ::= String (LANGTAG | '^^' iri)?

vs.

[7] predicateObjectList ::= verb objectList (';' (verb objectList)?)*


We "all know" that whitespace is allowed around ; - and not around ^^
- yet I can't see this reflected in these rules. Perhaps my grammar
understanding is a bit rusty.


http://www.w3.org/TR/turtle/#sec-grammar-ws says:

> White space (production WS) is used to separate two terminals which would otherwise be (mis-)recognized as one terminal. Rule names below in capitals indicate where white space is significant; these form a possible choice of terminals for constructing a Turtle parser.

> White space is significant in the production String.


Neither RDFLiteral or predicateObjectList are listed under Terminals.


So there's a special WS production - but that's only used between [ ]
- e.g. so you can do

[ a foaf:Person ]  #someone
  foaf:knows  # Someone (else?)
  [ a foaf:Person ] .



String is


[17] String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE |
STRING_LITERAL_LONG_SINGLE_QUOTE | STRING_LITERAL_LONG_QUOTE



Can anyone enlighten me?



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718

Received on Monday, 19 January 2015 16:05:51 UTC