wrappedGraph : Can now be empty (no triples)
authorAndy Seaborne <andy.seaborne@apache.org>
Sat, 07 Sep 2013 21:13:17 +0100
changeset 1075 9e1d21098b57
parent 1074 8c911aa5490d
child 1076 bc454a868f9d
wrappedGraph : Can now be empty (no triples)
trig/trig-bnf.html
trig/trig.bnf
--- a/trig/trig-bnf.html	Sat Sep 07 11:59:36 2013 -0700
+++ b/trig/trig-bnf.html	Sat Sep 07 21:13:17 2013 +0100
@@ -24,11 +24,11 @@
     <td>::=</td>
     <td>(<a href='#grammar-production-blankNodePropertyList'>blankNodePropertyList</a> <code>| </code> <a href='#grammar-production-collection'>collection</a>) <a href='#grammar-production-predicateObjectList'>predicateObjectList</a>? '<code class='grammar-literal'>.</code>'</td>
 </tr>
-            <tr id="grammar-production-wrappedGraph" data-grammar-original="[5g] wrappedGraph   ::=&#x27;{&#x27; triplesBlock &#x27;}&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;{&#x27;), (&#x27;id&#x27;, &#x27;triplesBlock&#x27;), (&quot;&#x27;&quot;, &#x27;}&#x27;)])" >
+            <tr id="grammar-production-wrappedGraph" data-grammar-original="[5g] wrappedGraph   ::=&#x27;{&#x27; triplesBlock? &#x27;}&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;{&#x27;), (&#x27;?&#x27;, (&#x27;id&#x27;, &#x27;triplesBlock&#x27;)), (&quot;&#x27;&quot;, &#x27;}&#x27;)])" >
     <td>[5g]</td>
     <td><code>wrappedGraph</code></td>
     <td>::=</td>
-    <td>'<code class='grammar-literal'>{</code>' <a href='#grammar-production-triplesBlock'>triplesBlock</a> '<code class='grammar-literal'>}</code>'</td>
+    <td>'<code class='grammar-literal'>{</code>' <a href='#grammar-production-triplesBlock'>triplesBlock</a>? '<code class='grammar-literal'>}</code>'</td>
 </tr>
             <tr id="grammar-production-triplesBlock" data-grammar-original="[6g] triplesBlock   ::=   triples ( &#x27;.&#x27; triplesBlock? )?" data-grammar-expression="(&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;triples&#x27;), (&#x27;?&#x27;, (&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;.&#x27;), (&#x27;?&#x27;, (&#x27;id&#x27;, &#x27;triplesBlock&#x27;))]))])" >
     <td>[6g]</td>
@@ -60,7 +60,7 @@
     <td>::=</td>
     <td>'<code class='grammar-literal'>@base</code>' <a href='#grammar-production-IRIREF'>IRIREF</a> '<code class='grammar-literal'>.</code>'</td>
 </tr>
-            <tr id="grammar-production-sparqlPrefix" data-grammar-original="[5s] sparqlPrefix ::= &quot;PREFIX&quot; PNAME_NS IRIREF" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;PREFIX&#x27;), (&#x27;id&#x27;, &#x27;PNAME_NS&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;)])" >
+            <tr id="grammar-production-sparqlPrefix" data-grammar-original="[5s] sparqlPrefix ::= &quotPREFIX&quot; PNAME_NS IRIREF" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;PREFIX&#x27;), (&#x27;id&#x27;, &#x27;PNAME_NS&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;)])" >
     <td>[5s]</td>
     <td><code>sparqlPrefix</code></td>
     <td>::=</td>
--- a/trig/trig.bnf	Sat Sep 07 11:59:36 2013 -0700
+++ b/trig/trig.bnf	Sat Sep 07 21:13:17 2013 +0100
@@ -3,7 +3,7 @@
 [2g] block   ::=   triplesOrGraph
   | wrappedGraph
   | triples2
-  | GRAPH labelOrSubject wrappedGraph
+  | "GRAPH" labelOrSubject wrappedGraph
 
 [3g] triplesOrGraph   ::=
   labelOrSubject ( wrappedGraph | predicateObjectList '.' )
@@ -12,7 +12,7 @@
   ( blankNodePropertyList | collection ) predicateObjectList? '.'
 
 [5g] wrappedGraph   ::=
-  '{' triplesBlock '}'
+  '{' triplesBlock? '}'
 
 [6g] triplesBlock   ::=   triples ( '.' triplesBlock? )?
 
@@ -72,8 +72,6 @@
 
 @terminals
 
-[2t] GRAPH                            ::= [Gg][Rr][Aa][Pp][Hh]
-
 [19] IRIREF ::=  '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'
  
 [139s] PNAME_NS ::= PN_PREFIX? ":"