Add SPARQL style PREFIX and BASE
authorGavin Carothers <gavin@carothers.name>
Wed, 20 Jun 2012 10:53:13 -0700
changeset 461 bcb0059aa02d
parent 460 f5c48c0dfa2c
child 462 0aa1bdd5c29c
Add SPARQL style PREFIX and BASE
rdf-turtle/turtle-bnf.html
--- a/rdf-turtle/turtle-bnf.html	Sat Jun 16 15:05:38 2012 -0700
+++ b/rdf-turtle/turtle-bnf.html	Wed Jun 20 10:53:13 2012 -0700
@@ -6,29 +6,41 @@
     <td>::=</td>
     <td><a href='#grammar-production-statement'>statement</a><code class='grammar-star'>*</code></td>
 </tr>
-            <tr id="grammar-production-statement" data-grammar-original="[2] statement ::= directive &quot;.&quot;| triples &quot;.&quot;" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;directive&#x27;), (&quot;&#x27;&quot;, &#x27;.&#x27;)]), (&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;triples&#x27;), (&quot;&#x27;&quot;, &#x27;.&#x27;)])])" >
+            <tr id="grammar-production-statement" data-grammar-original="[2] statement ::= directive| triples &quot;.&quot;" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;id&#x27;, &#x27;directive&#x27;), (&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;triples&#x27;), (&quot;&#x27;&quot;, &#x27;.&#x27;)])])" >
     <td>[2]<td>
     <td><code>statement</code><td>
     <td>::=</td>
-    <td><a href='#grammar-production-directive'>directive</a> '<code class='grammar-literal'>.</code>' <code>| </code> <a href='#grammar-production-triples'>triples</a> '<code class='grammar-literal'>.</code>'</td>
+    <td><a href='#grammar-production-directive'>directive</a> <code>| </code> <a href='#grammar-production-triples'>triples</a> '<code class='grammar-literal'>.</code>'</td>
 </tr>
-            <tr id="grammar-production-directive" data-grammar-original="[3] directive ::= prefixID| base" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;id&#x27;, &#x27;prefixID&#x27;), (&#x27;id&#x27;, &#x27;base&#x27;)])" >
+            <tr id="grammar-production-directive" data-grammar-original="[3] directive ::= prefixID| base | sparqlPrefix | sparqlBase" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;id&#x27;, &#x27;prefixID&#x27;), (&#x27;id&#x27;, &#x27;base&#x27;), (&#x27;id&#x27;, &#x27;sparqlPrefix&#x27;), (&#x27;id&#x27;, &#x27;sparqlBase&#x27;)])" >
     <td>[3]<td>
     <td><code>directive</code><td>
     <td>::=</td>
-    <td><a href='#grammar-production-prefixID'>prefixID</a> <code>| </code> <a href='#grammar-production-base'>base</a></td>
+    <td><a href='#grammar-production-prefixID'>prefixID</a> <code>| </code> <a href='#grammar-production-base'>base</a> <code>| </code> <a href='#grammar-production-sparqlPrefix'>sparqlPrefix</a> <code>| </code> <a href='#grammar-production-sparqlBase'>sparqlBase</a></td>
 </tr>
-            <tr id="grammar-production-prefixID" data-grammar-original="[4] prefixID ::= &#x27;@prefix&#x27; 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-prefixID" data-grammar-original="[4] prefixID ::= &#x27;@prefix&#x27; PNAME_NS IRIREF &quot;.&quot;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;@prefix&#x27;), (&#x27;id&#x27;, &#x27;PNAME_NS&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;), (&quot;&#x27;&quot;, &#x27;.&#x27;)])" >
     <td>[4]<td>
     <td><code>prefixID</code><td>
     <td>::=</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>
+    <td>'<code class='grammar-literal'>@prefix</code>' <a href='#grammar-production-PNAME_NS'>PNAME_NS</a> <a href='#grammar-production-IRIREF'>IRIREF</a> '<code class='grammar-literal'>.</code>'</td>
 </tr>
-            <tr id="grammar-production-base" data-grammar-original="[5] base ::= &#x27;@base&#x27; IRIREF" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;@base&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;)])" >
+            <tr id="grammar-production-base" data-grammar-original="[5] base ::= &#x27;@base&#x27; IRIREF &quot;.&quot;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;@base&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;), (&quot;&#x27;&quot;, &#x27;.&#x27;)])" >
     <td>[5]<td>
     <td><code>base</code><td>
     <td>::=</td>
-    <td>'<code class='grammar-literal'>@base</code>' <a href='#grammar-production-IRIREF'>IRIREF</a></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][Xx] PNAME_NS IRIREF" data-grammar-expression="(&#x27;,&#x27;, [(&#x27;[&#x27;, &#x27;Pp&#x27;), (&#x27;[&#x27;, &#x27;Rr&#x27;), (&#x27;[&#x27;, &#x27;Ee&#x27;), (&#x27;[&#x27;, &#x27;Ff&#x27;), (&#x27;[&#x27;, &#x27;Xx&#x27;), (&#x27;id&#x27;, &#x27;PNAME_NS&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;)])" >
+    <td>[28*]<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'>Xx</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="(&#x27;,&#x27;, [(&#x27;[&#x27;, &#x27;Bb&#x27;), (&#x27;[&#x27;, &#x27;Aa&#x27;), (&#x27;[&#x27;, &#x27;Ss&#x27;), (&#x27;[&#x27;, &#x27;Ee&#x27;), (&#x27;id&#x27;, &#x27;IRIREF&#x27;)])" >
+    <td>[29*]<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>
 </tr>
             <tr id="grammar-production-triples" data-grammar-original="[6] triples ::= subject predicateObjectList |blankNodePropertyList predicateObjectList?" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;subject&#x27;), (&#x27;id&#x27;, &#x27;predicateObjectList&#x27;)]), (&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;blankNodePropertyList&#x27;), (&#x27;?&#x27;, (&#x27;id&#x27;, &#x27;predicateObjectList&#x27;))])])" >
     <td>[6]<td>