Make graph label optional
authorGavin Carothers <gavin@carothers.name>
Tue, 02 Jul 2013 13:07:12 -0700
changeset 877 dd2712073896
parent 876 a69a3e0791d9
child 878 188ed285f5b6
Make graph label optional
nquads/nquads-bnf.html
nquads/nquads.bnf
--- a/nquads/nquads-bnf.html	Tue Jul 02 12:27:37 2013 -0700
+++ b/nquads/nquads-bnf.html	Tue Jul 02 13:07:12 2013 -0700
@@ -6,11 +6,11 @@
     <td>::=</td>
     <td><a href='#grammar-production-statement'>statement</a>? (<a href='#grammar-production-EOL'>EOL</a> <a href='#grammar-production-statement'>statement</a>)<code class='grammar-star'>*</code> <a href='#grammar-production-EOL'>EOL</a>?</td>
 </tr>
-            <tr id="grammar-production-statement" data-grammar-original="[2]  statement          ::= WS* subject WS+ predicate WS+ object WS+ graphLabel WS* &#x27;.&#x27; WS*" data-grammar-expression="(&#x27;,&#x27;, [(&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;subject&#x27;), (&#x27;+&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;predicate&#x27;), (&#x27;+&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;object&#x27;), (&#x27;+&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;graphLabel&#x27;), (&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&quot;&#x27;&quot;, &#x27;.&#x27;), (&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;))])" >
+            <tr id="grammar-production-statement" data-grammar-original="[2]  statement          ::= WS* subject WS+ predicate WS+ object (WS+ graphLabel)? WS* &#x27;.&#x27; WS*" data-grammar-expression="(&#x27;,&#x27;, [(&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;subject&#x27;), (&#x27;+&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;predicate&#x27;), (&#x27;+&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;object&#x27;), (&#x27;?&#x27;, (&#x27;,&#x27;, [(&#x27;+&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&#x27;id&#x27;, &#x27;graphLabel&#x27;)])), (&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;)), (&quot;&#x27;&quot;, &#x27;.&#x27;), (&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;))])" >
     <td>[2]</td>
     <td><code>statement</code></td>
     <td>::=</td>
-    <td><a href='#grammar-production-WS'>WS</a><code class='grammar-star'>*</code> <a href='#grammar-production-subject'>subject</a> <a href='#grammar-production-WS'>WS</a><code class='grammar-plus'>+</code> <a href='#grammar-production-predicate'>predicate</a> <a href='#grammar-production-WS'>WS</a><code class='grammar-plus'>+</code> <a href='#grammar-production-object'>object</a> <a href='#grammar-production-WS'>WS</a><code class='grammar-plus'>+</code> <a href='#grammar-production-graphLabel'>graphLabel</a> <a href='#grammar-production-WS'>WS</a><code class='grammar-star'>*</code> '<code class='grammar-literal'>.</code>' <a href='#grammar-production-WS'>WS</a><code class='grammar-star'>*</code></td>
+    <td><a href='#grammar-production-WS'>WS</a><code class='grammar-star'>*</code> <a href='#grammar-production-subject'>subject</a> <a href='#grammar-production-WS'>WS</a><code class='grammar-plus'>+</code> <a href='#grammar-production-predicate'>predicate</a> <a href='#grammar-production-WS'>WS</a><code class='grammar-plus'>+</code> <a href='#grammar-production-object'>object</a> (<a href='#grammar-production-WS'>WS</a><code class='grammar-plus'>+</code> <a href='#grammar-production-graphLabel'>graphLabel</a>)? <a href='#grammar-production-WS'>WS</a><code class='grammar-star'>*</code> '<code class='grammar-literal'>.</code>' <a href='#grammar-production-WS'>WS</a><code class='grammar-star'>*</code></td>
 </tr>
             <tr id="grammar-production-subject" data-grammar-original="[3]  subject            ::= IRIREF | BLANK_NODE_LABEL" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;id&#x27;, &#x27;IRIREF&#x27;), (&#x27;id&#x27;, &#x27;BLANK_NODE_LABEL&#x27;)])" >
     <td>[3]</td>
@@ -42,7 +42,7 @@
     <td>::=</td>
     <td><a href='#grammar-production-STRING_LITERAL_QUOTE'>STRING_LITERAL_QUOTE</a> ('<code class='grammar-literal'>^^</code>' <a href='#grammar-production-IRIREF'>IRIREF</a> <code>| </code> '<code class='grammar-literal'>@</code>' <a href='#grammar-production-LANG'>LANG</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-LANG" data-grammar-original="[8]  LANG               ::= [a-zA-Z]+ ( &quot;-&quot; [a-zA-Z0-9]+ )*" data-grammar-expression="(&#x27;,&#x27;, [(&#x27;+&#x27;, (&#x27;[&#x27;, &#x27;a-zA-Z&#x27;)), (&#x27;*&#x27;, (&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;-&#x27;), (&#x27;+&#x27;, (&#x27;[&#x27;, &#x27;a-zA-Z0-9&#x27;))]))])" class='grammar-token'>
     <td>[8]</td>
     <td><code>LANG</code></td>
--- a/nquads/nquads.bnf	Tue Jul 02 12:27:37 2013 -0700
+++ b/nquads/nquads.bnf	Tue Jul 02 13:07:12 2013 -0700
@@ -1,5 +1,5 @@
 [1]  nquadsDoc          ::= statement? (EOL statement)* EOL?
-[2]  statement          ::= WS* subject WS+ predicate WS+ object WS+ graphLabel WS* '.' WS*
+[2]  statement          ::= WS* subject WS+ predicate WS+ object (WS+ graphLabel)? WS* '.' WS*
 [3]  subject            ::= IRIREF | BLANK_NODE_LABEL
 [4]  predicate          ::= IRIREF 
 [5]  object             ::= IRIREF | BLANK_NODE_LABEL | literal