Update to allow blank nodes in graphname, allow missing trailing .
--- a/trig/index.html Sat Jun 15 12:31:25 2013 -0700
+++ b/trig/index.html Sat Jun 15 13:04:11 2013 -0700
@@ -111,7 +111,7 @@
that allows an RDF dataset to be completely written in a compact and
natural text form, with abbreviations for common usage patterns and
datatypes. TriG is an extension of the
- Turtle [[!TURTLE-TR]] format.
+ Turtle [[!turtle]] format.
</p>
</section>
@@ -119,7 +119,7 @@
<p>TriG is intended the meet the charter requirement of the
<a href="http://www.w3.org/2011/rdf-wg/">RDF Working Group</a> to
define an RDF syntax for multiple graphs. TriG is an extension of the
-Turtle syntax for RDF [[!TURTLE-TR]. The current document is based on
+Turtle syntax for RDF [[!turtle]. The current document is based on
the original proposal by Chris Bizer and Richard Cyganiak.</p>
</section>
@@ -128,7 +128,7 @@
<p>This document defines TriG a concrete syntax for RDF as defined in the
RDF Concepts and Abstract Syntax
([[!RDF11-CONCEPTS]]). TriG is an extension of
- Turtle ([[!TURTLE-TR]]), extended
+ Turtle ([[!turtle]]), extended
to support representing a complete RDF Dataset.
</section>
@@ -432,7 +432,7 @@
<section id="grammar-ebnf">
<h3>Grammar</h3>
<p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
- [[!EBNF-NOTATION]]. Production labels consisting of a number and a final 'g' are unique to TriG. All Production labels consisting of only a number reference the production with that number in the Turtle grammar [[TURTLE-TR]]. Production labels consisting of a number and a final 's', e.g. [<a href="http://www.w3.org/TR/sparql11-query/#rRDFLiteral"><span class="prodNo">60s</span></a>], reference the production with that number in the <a href="http://www.w3.org/TR/sparql11-query/#sparqlGrammar">SPARQL Query Language for RDF grammar</a> [[RDF-SPARQL-QUERY]].
+ [[!EBNF-NOTATION]]. Production labels consisting of a number and a final 'g' are unique to TriG. All Production labels consisting of only a number reference the production with that number in the Turtle grammar [[turtle]]. Production labels consisting of a number and a final 's', e.g. [<a href="http://www.w3.org/TR/sparql11-query/#rRDFLiteral"><span class="prodNo">60s</span></a>], reference the production with that number in the <a href="http://www.w3.org/TR/sparql11-query/#sparqlGrammar">SPARQL Query Language for RDF grammar</a> [[RDF-SPARQL-QUERY]].
</p>
<div data-include="trig-bnf.html"></div>
--- a/trig/trig-bnf.html Sat Jun 15 12:31:25 2013 -0700
+++ b/trig/trig-bnf.html Sat Jun 15 13:04:11 2013 -0700
@@ -12,17 +12,23 @@
<td>::=</td>
<td><a href='#grammar-production-directive'>directive</a> <code>| </code> <a href='#grammar-production-graph'>graph</a></td>
</tr>
- <tr id="grammar-production-graph" data-grammar-original="[3g] graph ::= graphIri? "{" (triples ".")* "}"" data-grammar-expression="(',', [('?', ('id', 'graphIri')), ("'", '{'), ('*', (',', [('id', 'triples'), ("'", '.')])), ("'", '}')])" >
+ <tr id="grammar-production-graph" data-grammar-original="[3g] graph ::= graphName? "{" triplesBlock? "}"" data-grammar-expression="(',', [('?', ('id', 'graphName')), ("'", '{'), ('?', ('id', 'triplesBlock')), ("'", '}')])" >
<td>[3g]</td>
<td><code>graph</code></td>
<td>::=</td>
- <td><a href='#grammar-production-graphIri'>graphIri</a>? '<code class='grammar-literal'>{</code>' (<a href='#grammar-production-triples'>triples</a> '<code class='grammar-literal'>.</code>')<code class='grammar-star'>*</code> '<code class='grammar-literal'>}</code>'</td>
+ <td><a href='#grammar-production-graphName'>graphName</a>? '<code class='grammar-literal'>{</code>' <a href='#grammar-production-triplesBlock'>triplesBlock</a>? '<code class='grammar-literal'>}</code>'</td>
</tr>
- <tr id="grammar-production-graphIri" data-grammar-original="[4g] graphIri ::= iri" data-grammar-expression="('id', 'iri')" >
+ <tr id="grammar-production-graphName" data-grammar-original="[4g] graphName ::= iri| BlankNode" data-grammar-expression="('|', [('id', 'iri'), ('id', 'BlankNode')])" >
<td>[4g]</td>
- <td><code>graphIri</code></td>
+ <td><code>graphName</code></td>
<td>::=</td>
- <td><a href='#grammar-production-iri'>iri</a></td>
+ <td><a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a></td>
+</tr>
+ <tr id="grammar-production-triplesBlock" data-grammar-original="[5g] triplesBlock ::= triples ('.' triplesBlock?)?" data-grammar-expression="(',', [('id', 'triples'), ('?', (',', [("'", '.'), ('?', ('id', 'triplesBlock'))]))])" >
+ <td>[5g]</td>
+ <td><code>triplesBlock</code></td>
+ <td>::=</td>
+ <td><a href='#grammar-production-triples'>triples</a> ('<code class='grammar-literal'>.</code>' <a href='#grammar-production-triplesBlock'>triplesBlock</a>?)?</td>
</tr>
<tr id="grammar-production-directive" data-grammar-original="[3] directive ::= prefixID| base | sparqlPrefix | sparqlBase" data-grammar-expression="('|', [('id', 'prefixID'), ('id', 'base'), ('id', 'sparqlPrefix'), ('id', 'sparqlBase')])" >
<td>[3]</td>
@@ -162,7 +168,7 @@
<td>::=</td>
<td><a href='#grammar-production-BLANK_NODE_LABEL'>BLANK_NODE_LABEL</a> <code>| </code> <a href='#grammar-production-ANON'>ANON</a></td>
</tr>
-<tr><td colspan="4"><h4 id="terminals">Productions for terminals</h4></td></tr>
+<tr><td colspan="5"><h4 id="terminals">Productions for terminals</h4></td></tr>
<tr id="grammar-production-IRIREF" data-grammar-original="[19] IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'" data-grammar-expression="(',', [("'", '<'), ('*', ('|', [('[', '^#x00-#x20<>"{}|^`\\'), ('id', 'UCHAR')])), ("'", '>')])" class='grammar-token'>
<td>[19]</td>
<td><code>IRIREF</code></td>
--- a/trig/trig.bnf Sat Jun 15 12:31:25 2013 -0700
+++ b/trig/trig.bnf Sat Jun 15 13:04:11 2013 -0700
@@ -3,9 +3,12 @@
[2g] graph_statement ::= directive
| graph
-[3g] graph ::= graphIri? "{" (triples ".")* "}"
+[3g] graph ::= graphName? "{" triplesBlock? "}"
-[4g] graphIri ::= iri
+[4g] graphName ::= iri
+| BlankNode
+
+[5g] triplesBlock ::= triples ('.' triplesBlock?)?
[3] directive ::= prefixID
| base | sparqlPrefix | sparqlBase