More wsp/comma-wsp cleanups.
authorErik Dahlstrom <ed@opera.com>
Mon, 26 May 2014 12:55:02 +0200
changeset 680 81c26c8c2608
parent 679 e62e8a7376a0
child 681 4c8efa7bbe28
More wsp/comma-wsp cleanups.
master/changes.html
master/color.html
master/shapes.html
--- a/master/changes.html	Mon May 26 10:45:44 2014 +0200
+++ b/master/changes.html	Mon May 26 12:55:02 2014 +0200
@@ -36,7 +36,7 @@
   <li>Annotations have been added to the specification to reflect features that the Working Group
   has resolved on including and for which a member of the group has committed to drive that feature.</li>
 
-  <li>The path data grammar now references <a>comma-wsp</a> and <a>wsp</a> from the types chapter.</li>
+  <li>Define <a>comma-wsp</a> and <a>wsp</a> in the types chapter and reference these from all other grammars that need it.</li>
 
 </ul>
 
--- a/master/color.html	Mon May 26 10:45:44 2014 +0200
+++ b/master/color.html	Mon May 26 12:55:02 2014 +0200
@@ -703,16 +703,16 @@
 
 <pre>
 <span id="icccolor">icccolor</span> ::= 
-  ~"icc-color(" <a href="#name">name</a> (<a href="#comma-wsp">comma-wsp</a> <a href="#number">number</a>)+ ")" 
+  ~"icc-color(" <a href="#name">name</a> (<a>comma-wsp</a> <a href="#number">number</a>)+ ")" 
   
 <span id="iccnamedcolor">iccnamedcolor</span> ::= 
-  ~"icc-named-color(" <a href="#name">name</a> <a href="#comma-wsp">comma-wsp</a> <a href="#namedColor">namedColor</a> ")" 
+  ~"icc-named-color(" <a href="#name">name</a> <a>comma-wsp</a> <a href="#namedColor">namedColor</a> ")" 
   
 <span id="cielabcolor">cielabcolor</span> ::=
-  ~"cielab(" <a href="#lightness">lightness</a> <a href="#comma-wsp">comma-wsp</a> <a href="#a-value">a-value</a> <a href="#comma-wsp">comma-wsp</a> <a href="#b-value">b-value</a> ")" 
+  ~"cielab(" <a href="#lightness">lightness</a> <a>comma-wsp</a> <a href="#a-value">a-value</a> <a>comma-wsp</a> <a href="#b-value">b-value</a> ")" 
   
 <span id="cielchabcolor">cielchabcolor</span> ::=
-  ~"cielchab(" <a href="#lightness">lightness</a> <a href="#comma-wsp">comma-wsp</a> <a href="#chroma">chroma</a> <a href="#comma-wsp">comma-wsp</a> <a href="#hue">hue</a> ")" 
+  ~"cielchab(" <a href="#lightness">lightness</a> <a>comma-wsp</a> <a href="#chroma">chroma</a> <a>comma-wsp</a> <a href="#hue">hue</a> ")" 
   
 <span id="devicecolor">devicecolor</span> ::=
   <a href="#devicegray">device-gray</a> | <a href="#devicergb">devicergb</a> | <a href="#devicecmyk">devicecmyk</a> | <a href="#devicenchannel">devicenchannel</a>
@@ -780,10 +780,10 @@
   
 <span id="color">color</span>  ::= 
   "#" <a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a> (<a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a>)?
-  | ~"rgb(" <a href="#wsp">wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#wsp">wsp</a>* ")"
-  | ~"rgb(" <a href="#wsp">wsp</a>* <a href="#integer">integer</a> "%" <a href="#comma">comma</a> <a href="#integer">integer</a> "%" <a href="#comma">comma</a> <a href="#integer">integer</a> "%" <a href="#wsp">wsp</a>* ")"
-  | ~"hsl(" <a href="#wsp">wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#wsp">wsp</a>* ")"
-  | ~"hsla(" <a href="#wsp">wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#wsp">wsp</a>* ")"
+  | ~"rgb(" <a>wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a>wsp</a>* ")"
+  | ~"rgb(" <a>wsp</a>* <a href="#integer">integer</a> "%" <a href="#comma">comma</a> <a href="#integer">integer</a> "%" <a href="#comma">comma</a> <a href="#integer">integer</a> "%" <a>wsp</a>* ")"
+  | ~"hsl(" <a>wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a>wsp</a>* ")"
+  | ~"hsla(" <a>wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a>wsp</a>* ")"
   | <a href="#color-keyword">color-keyword</a>
   
 <span id="hexdigit">hexdigit</span> ::= 
@@ -810,17 +810,10 @@
 <span id="namechar">namechar</span> ::=
   <a href="#namestartchar">namestartchar</a> | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] |
   [#x203F-#x2040]
-
-  
-<span id="comma-wsp">comma-wsp</span> ::=
-  (<a href="#wsp">wsp</a>+ <a href="#comma">comma</a>? <a href="#wsp">wsp</a>*) | (<a href="#comma">comma</a> <a href="#wsp">wsp</a>*)
   
 <span id="comma">comma</span> ::=
   ","
   
-<span id="wsp">wsp</span> ::=
-  (#x20 | #x9 | #xD | #xA)
-  
 <span id="color-keyword">color-keyword</span> ::=
   ~"aliceblue" | ~"antiquewhite" | ~"aqua" | ~"aquamarine" | ~"azure" | ~"beige" | 
   ~"bisque" | ~"black" | ~"blanchedalmond" | ~"blue" | ~"blueviolet" | ~"brown" | 
--- a/master/shapes.html	Mon May 26 10:45:44 2014 +0200
+++ b/master/shapes.html	Mon May 26 12:55:02 2014 +0200
@@ -637,14 +637,14 @@
   <li>double quotes surround literals</li>
 </ul>
 
-<pre>
+<pre class='grammar'>
 list-of-points:
-    wsp* coordinate-pairs? wsp*
+    <a>wsp</a>* coordinate-pairs? <a>wsp</a>*
 coordinate-pairs:
     coordinate-pair
-    | coordinate-pair comma-wsp coordinate-pairs
+    | coordinate-pair <a>comma-wsp</a> coordinate-pairs
 coordinate-pair:
-    coordinate comma-wsp coordinate
+    coordinate <a>comma-wsp</a> coordinate
     | coordinate negative-coordinate
 coordinate:
     number
@@ -654,10 +654,6 @@
 negative-coordinate:
     "-" integer-constant
     | "-" floating-point-constant
-comma-wsp:
-    (wsp+ comma? wsp*) | (comma wsp*)
-comma:
-    ","
 integer-constant:
     digit-sequence
 floating-point-constant:
@@ -675,8 +671,6 @@
     | digit digit-sequence
 digit:
     "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
-wsp:
-    (#x20 | #x9 | #xD | #xA)+
 </pre>
 
 <p class="ready-for-wg-review">