--- a/trig/trig-bnf.html Sat Aug 31 15:10:04 2013 +0100
+++ b/trig/trig-bnf.html Sat Aug 31 15:10:51 2013 +0100
@@ -1,31 +1,37 @@
<table class="grammar">
<tbody class="grammar-productions">
- <tr id="grammar-production-trigDoc" data-grammar-original="[1g] trigDoc ::= (graph_statement)*" data-grammar-expression="('*', ('id', 'graph_statement'))" >
+ <tr id="grammar-production-trigDoc" data-grammar-original="[1g] trigDoc ::= ( directive | block )*" data-grammar-expression="('*', ('|', [('id', 'directive'), ('id', 'block')]))" >
<td>[1g]</td>
<td><code>trigDoc</code></td>
<td>::=</td>
- <td><a href='#grammar-production-graph_statement'>graph_statement</a><code class='grammar-star'>*</code></td>
+ <td>(<a href='#grammar-production-directive'>directive</a> <code>| </code> <a href='#grammar-production-block'>block</a>)<code class='grammar-star'>*</code></td>
</tr>
- <tr id="grammar-production-graph_statement" data-grammar-original="[2g] graph_statement ::= directive| graph" data-grammar-expression="('|', [('id', 'directive'), ('id', 'graph')])" >
+ <tr id="grammar-production-block" data-grammar-original="[2g] block ::= triplesOrGraph| wrappedGraph| triples2| "GRAPH" ( iri | BlankNode ) wrappedGraph" data-grammar-expression="('|', [('id', 'triplesOrGraph'), ('id', 'wrappedGraph'), ('id', 'triples2'), (',', [("'", 'GRAPH'), ('|', [('id', 'iri'), ('id', 'BlankNode')]), ('id', 'wrappedGraph')])])" >
<td>[2g]</td>
- <td><code>graph_statement</code></td>
+ <td><code>block</code></td>
<td>::=</td>
- <td><a href='#grammar-production-directive'>directive</a> <code>| </code> <a href='#grammar-production-graph'>graph</a></td>
+ <td><a href='#grammar-production-triplesOrGraph'>triplesOrGraph</a> <code>| </code> <a href='#grammar-production-wrappedGraph'>wrappedGraph</a> <code>| </code> <a href='#grammar-production-triples2'>triples2</a> <code>| </code> "<code class='grammar-literal'>GRAPH</code>" (<a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a>) <a href='#grammar-production-wrappedGraph'>wrappedGraph</a></td>
</tr>
- <tr id="grammar-production-graph" data-grammar-original="[3g] graph ::= graphName? "{" triplesBlock? "}"" data-grammar-expression="(',', [('?', ('id', 'graphName')), ("'", '{'), ('?', ('id', 'triplesBlock')), ("'", '}')])" >
+ <tr id="grammar-production-triplesOrGraph" data-grammar-original="[3g] triplesOrGraph ::=( iri | BlankNode ) ( wrappedGraph | predicateObjectList '.' )" data-grammar-expression="(',', [('|', [('id', 'iri'), ('id', 'BlankNode')]), ('|', [('id', 'wrappedGraph'), (',', [('id', 'predicateObjectList'), ("'", '.')])])])" >
<td>[3g]</td>
- <td><code>graph</code></td>
+ <td><code>triplesOrGraph</code></td>
<td>::=</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>
+ <td>(<a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a>) (<a href='#grammar-production-wrappedGraph'>wrappedGraph</a> <code>| </code> <a href='#grammar-production-predicateObjectList'>predicateObjectList</a> '<code class='grammar-literal'>.</code>')</td>
</tr>
- <tr id="grammar-production-graphName" data-grammar-original="[4g] graphName ::= iri| BlankNode" data-grammar-expression="('|', [('id', 'iri'), ('id', 'BlankNode')])" >
+ <tr id="grammar-production-triples2" data-grammar-original="[4g] triples2 ::=( blankNodePropertyList | collection ) predicateObjectList? '.'" data-grammar-expression="(',', [('|', [('id', 'blankNodePropertyList'), ('id', 'collection')]), ('?', ('id', 'predicateObjectList')), ("'", '.')])" >
<td>[4g]</td>
- <td><code>graphName</code></td>
+ <td><code>triples2</code></td>
<td>::=</td>
- <td><a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a></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-triplesBlock" data-grammar-original="[5g] triplesBlock ::= triples ('.' triplesBlock?)?" data-grammar-expression="(',', [('id', 'triples'), ('?', (',', [("'", '.'), ('?', ('id', 'triplesBlock'))]))])" >
+ <tr id="grammar-production-wrappedGraph" data-grammar-original="[5g] wrappedGraph ::='{' triplesBlock '}'" data-grammar-expression="(',', [("'", '{'), ('id', 'triplesBlock'), ("'", '}')])" >
<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>
+</tr>
+ <tr id="grammar-production-triplesBlock" data-grammar-original="[6g] triplesBlock ::= triples ( '.' triplesBlock? )?" data-grammar-expression="(',', [('id', 'triples'), ('?', (',', [("'", '.'), ('?', ('id', 'triplesBlock'))]))])" >
+ <td>[6g]</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>
@@ -48,17 +54,17 @@
<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="[28*] sparqlPrefix ::= [Pp][Rr][Ee][Ff][Ii][Xx] PNAME_NS IRIREF" data-grammar-expression="(',', [('[', 'Pp'), ('[', 'Rr'), ('[', 'Ee'), ('[', 'Ff'), ('[', 'Ii'), ('[', 'Xx'), ('id', 'PNAME_NS'), ('id', 'IRIREF')])" >
- <td>[28*]</td>
+ <tr id="grammar-production-sparqlPrefix" data-grammar-original="[28a] sparqlPrefix ::= "PREFIX" PNAME_NS IRIREF" data-grammar-expression="(',', [("'", 'PREFIX'), ('id', 'PNAME_NS'), ('id', 'IRIREF')])" >
+ <td>[28a]</td>
<td><code>sparqlPrefix</code></td>
<td>::=</td>
- <td>[<code class='grammar-chars'>Pp</code>] [<code class='grammar-chars'>Rr</code>] [<code class='grammar-chars'>Ee</code>] [<code class='grammar-chars'>Ff</code>] [<code class='grammar-chars'>Ii</code>] [<code class='grammar-chars'>Xx</code>] <a href='#grammar-production-PNAME_NS'>PNAME_NS</a> <a href='#grammar-production-IRIREF'>IRIREF</a></td>
+ <td>"<code class='grammar-literal'>PREFIX</code>" <a href='#grammar-production-PNAME_NS'>PNAME_NS</a> <a href='#grammar-production-IRIREF'>IRIREF</a></td>
</tr>
- <tr id="grammar-production-sparqlBase" data-grammar-original="[29*] sparqlBase ::= [Bb][Aa][Ss][Ee] IRIREF" data-grammar-expression="(',', [('[', 'Bb'), ('[', 'Aa'), ('[', 'Ss'), ('[', 'Ee'), ('id', 'IRIREF')])" >
- <td>[29*]</td>
+ <tr id="grammar-production-sparqlBase" data-grammar-original="[29a] sparqlBase ::= "BASE" IRIREF" data-grammar-expression="(',', [("'", 'BASE'), ('id', 'IRIREF')])" >
+ <td>[29a]</td>
<td><code>sparqlBase</code></td>
<td>::=</td>
- <td>[<code class='grammar-chars'>Bb</code>] [<code class='grammar-chars'>Aa</code>] [<code class='grammar-chars'>Ss</code>] [<code class='grammar-chars'>Ee</code>] <a href='#grammar-production-IRIREF'>IRIREF</a></td>
+ <td>"<code class='grammar-literal'>BASE</code>" <a href='#grammar-production-IRIREF'>IRIREF</a></td>
</tr>
<tr id="grammar-production-triples" data-grammar-original="[6] triples ::= subject predicateObjectList |blankNodePropertyList predicateObjectList?" data-grammar-expression="('|', [(',', [('id', 'subject'), ('id', 'predicateObjectList')]), (',', [('id', 'blankNodePropertyList'), ('?', ('id', 'predicateObjectList'))])])" >
<td>[6]</td>
@@ -168,7 +174,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="5"><h4 id="terminals">Productions for terminals</h4></td></tr>
+<tr><td colspan="4"><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>