Change whitespace from TOKEN to description
authorGavin Carothers <gavin@carothers.name>
Tue, 27 Aug 2013 09:12:02 -0700
changeset 1010 a5b41d9a9d54
parent 1009 2580b1259313
child 1011 a85c137db7a7
Change whitespace from TOKEN to description
rdf-turtle/n-prime-bnf.html
rdf-turtle/n-prime.bnf
rdf-turtle/n-triples.html
--- a/rdf-turtle/n-prime-bnf.html	Mon Aug 26 18:41:26 2013 -0400
+++ b/rdf-turtle/n-prime-bnf.html	Tue Aug 27 09:12:02 2013 -0700
@@ -6,11 +6,11 @@
     <td>::=</td>
     <td><a href='#grammar-production-triple'>triple</a>? (<a href='#grammar-production-EOL'>EOL</a> <a href='#grammar-production-triple'>triple</a>)<code class='grammar-star'>*</code> <a href='#grammar-production-EOL'>EOL</a>?</td>
 </tr>
-            <tr id="grammar-production-triple" data-grammar-original="[2]  triple             ::= WS* subject WS+ predicate WS+ object 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;)), (&quot;&#x27;&quot;, &#x27;.&#x27;), (&#x27;*&#x27;, (&#x27;id&#x27;, &#x27;WS&#x27;))])" >
+            <tr id="grammar-production-triple" data-grammar-original="[2]  triple             ::= subject predicate object &#x27;.&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;subject&#x27;), (&#x27;id&#x27;, &#x27;predicate&#x27;), (&#x27;id&#x27;, &#x27;object&#x27;), (&quot;&#x27;&quot;, &#x27;.&#x27;)])" >
     <td>[2]</td>
     <td><code>triple</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-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-subject'>subject</a> <a href='#grammar-production-predicate'>predicate</a> <a href='#grammar-production-object'>object</a> '<code class='grammar-literal'>.</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>
@@ -49,20 +49,14 @@
     <td>::=</td>
     <td>[<code class='grammar-chars'>#xD#xA</code>]<code class='grammar-plus'>+</code></td>
 </tr>
-            <tr id="grammar-production-WS" data-grammar-original="[8]  WS                 ::= [#x20#x9]" data-grammar-expression="(&#x27;[&#x27;, &#x27;#x20#x9&#x27;)" class='grammar-token'>
+            <tr id="grammar-production-IRIREF" data-grammar-original="[8] IRIREF ::=  &#x27;&lt;&#x27; ([^#x00-#x20&lt;&gt;&quot;{}|^`\] | UCHAR)* &#x27;&gt;&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;&lt;&#x27;), (&#x27;*&#x27;, (&#x27;|&#x27;, [(&#x27;[&#x27;, &#x27;^#x00-#x20&lt;&gt;&quot;{}|^`\\&#x27;), (&#x27;id&#x27;, &#x27;UCHAR&#x27;)])), (&quot;&#x27;&quot;, &#x27;&gt;&#x27;)])" class='grammar-token'>
     <td>[8]</td>
-    <td><code>WS</code></td>
-    <td>::=</td>
-    <td>[<code class='grammar-chars'>#x20#x9</code>]</td>
-</tr>
-            <tr id="grammar-production-IRIREF" data-grammar-original="[9] IRIREF ::=  &#x27;&lt;&#x27; ([^#x00-#x20&lt;&gt;&quot;{}|^`\] | UCHAR)* &#x27;&gt;&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;&lt;&#x27;), (&#x27;*&#x27;, (&#x27;|&#x27;, [(&#x27;[&#x27;, &#x27;^#x00-#x20&lt;&gt;&quot;{}|^`\\&#x27;), (&#x27;id&#x27;, &#x27;UCHAR&#x27;)])), (&quot;&#x27;&quot;, &#x27;&gt;&#x27;)])" class='grammar-token'>
-    <td>[9]</td>
     <td><code>IRIREF</code></td>
     <td>::=</td>
     <td>'<code class='grammar-literal'>&lt;</code>' ([<code class='grammar-chars'>^#x00-#x20&lt;&gt;&quot;{}|^`\</code>] <code>| </code> <a href='#grammar-production-UCHAR'>UCHAR</a>)<code class='grammar-star'>*</code> '<code class='grammar-literal'>&gt;</code>'</td>
 </tr>
-            <tr id="grammar-production-STRING_LITERAL_QUOTE" data-grammar-original="[10] STRING_LITERAL_QUOTE ::= &#x27;&quot;&#x27; ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* &#x27;&quot;&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;&quot;&#x27;), (&#x27;*&#x27;, (&#x27;|&#x27;, [(&#x27;[&#x27;, &#x27;^#x22#x5C#xA#xD&#x27;), (&#x27;id&#x27;, &#x27;ECHAR&#x27;), (&#x27;id&#x27;, &#x27;UCHAR&#x27;)])), (&quot;&#x27;&quot;, &#x27;&quot;&#x27;)])" class='grammar-token'>
-    <td>[10]</td>
+            <tr id="grammar-production-STRING_LITERAL_QUOTE" data-grammar-original="[9] STRING_LITERAL_QUOTE ::= &#x27;&quot;&#x27; ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* &#x27;&quot;&#x27;" data-grammar-expression="(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;&quot;&#x27;), (&#x27;*&#x27;, (&#x27;|&#x27;, [(&#x27;[&#x27;, &#x27;^#x22#x5C#xA#xD&#x27;), (&#x27;id&#x27;, &#x27;ECHAR&#x27;), (&#x27;id&#x27;, &#x27;UCHAR&#x27;)])), (&quot;&#x27;&quot;, &#x27;&quot;&#x27;)])" class='grammar-token'>
+    <td>[9]</td>
     <td><code>STRING_LITERAL_QUOTE</code></td>
     <td>::=</td>
     <td>'<code class='grammar-literal'>&quot;</code>' ([<code class='grammar-chars'>^#x22#x5C#xA#xD</code>] <code>| </code> <a href='#grammar-production-ECHAR'>ECHAR</a> <code>| </code> <a href='#grammar-production-UCHAR'>UCHAR</a>)<code class='grammar-star'>*</code> '<code class='grammar-literal'>&quot;</code>'</td>
@@ -73,8 +67,8 @@
     <td>::=</td>
     <td>'<code class='grammar-literal'>_:</code>' (<a href='#grammar-production-PN_CHARS_U'>PN_CHARS_U</a> <code>| </code> [<code class='grammar-chars'>0-9</code>]) ((<a href='#grammar-production-PN_CHARS'>PN_CHARS</a> <code>| </code> '<code class='grammar-literal'>.</code>')<code class='grammar-star'>*</code> <a href='#grammar-production-PN_CHARS'>PN_CHARS</a>)?</td>
 </tr>
-            <tr id="grammar-production-UCHAR" data-grammar-original="[11] UCHAR ::= ( &quot;\u&quot; HEX HEX HEX HEX )| ( &quot;\U&quot; HEX HEX HEX HEX HEX HEX HEX HEX )" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;\\u&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;)]), (&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;\\U&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;)])])" class='grammar-token'>
-    <td>[11]</td>
+            <tr id="grammar-production-UCHAR" data-grammar-original="[10] UCHAR ::= ( &quot;\u&quot; HEX HEX HEX HEX )| ( &quot;\U&quot; HEX HEX HEX HEX HEX HEX HEX HEX )" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;\\u&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;)]), (&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;\\U&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;), (&#x27;id&#x27;, &#x27;HEX&#x27;)])])" class='grammar-token'>
+    <td>[10]</td>
     <td><code>UCHAR</code></td>
     <td>::=</td>
     <td>'<code class='grammar-literal'>\u</code>' <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <code>| </code> '<code class='grammar-literal'>\U</code>' <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a> <a href='#grammar-production-HEX'>HEX</a></td>
--- a/rdf-turtle/n-prime.bnf	Mon Aug 26 18:41:26 2013 -0400
+++ b/rdf-turtle/n-prime.bnf	Tue Aug 27 09:12:02 2013 -0700
@@ -1,5 +1,5 @@
 [1]  ntriplesDoc        ::= triple? (EOL triple)* EOL?
-[2]  triple             ::= WS* subject WS+ predicate WS+ object WS* '.' WS*
+[2]  triple             ::= subject predicate object '.'
 [3]  subject            ::= IRIREF | BLANK_NODE_LABEL
 [4]  predicate          ::= IRIREF 
 [5]  object             ::= IRIREF | BLANK_NODE_LABEL | literal
@@ -10,13 +10,12 @@
 [144s] LANGTAG          ::= "@" [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )* 
 
 [7]  EOL                ::= [#xD#xA]+
-[8]  WS                 ::= [#x20#x9]
 
-[9] IRIREF ::=  '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'
-[10] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"' 
+[8] IRIREF ::=  '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'
+[9] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"' 
 
 [141s] BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?
-[11] UCHAR ::= ( "\u" HEX HEX HEX HEX ) 
+[10] UCHAR ::= ( "\u" HEX HEX HEX HEX ) 
  | ( "\U" HEX HEX HEX HEX HEX HEX HEX HEX ) 
 [153s] ECHAR ::= "\" [tbnrf"'] 
 [157s] PN_CHARS_BASE    ::= [A-Z] 
--- a/rdf-turtle/n-triples.html	Mon Aug 26 18:41:26 2013 -0400
+++ b/rdf-turtle/n-triples.html	Tue Aug 27 09:12:02 2013 -0700
@@ -253,6 +253,7 @@
           <h3>Grammar</h3>
           <p>A N-Triples document is a Unicode [[!UNICODE]] character string encoded in UTF-8.
           Unicode codepoints only in the range U+0 to U+10FFFF inclusive are allowed.</p>
+          <p>White space (tab <code>U+0009</code> or space <code>U+0020</code>) is used to separate two terminals which would otherwise be (mis-)recognized as one terminal. White space is significant in the production <a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a>.</p>
           <p>Comments in N-Triples take the form of '<code>#</code>', outside an <code>IRIREF</code> or <code>STRING_LITERAL_QUOTE</code>, and continue to the end of line (<code>EOL</code>) or end of file if there is no end of line after the comment marker. Comments are treated as white space.</p>
           <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
             [[!EBNF-NOTATION]].</p>