Make path data grammar reference the wsp and comma-wsp definitions
authorErik Dahlstrom <ed@opera.com>
Mon, 26 May 2014 10:45:44 +0200
changeset 679 e62e8a7376a0
parent 678 bb28f5663dc7
child 680 81c26c8c2608
Make path data grammar reference the wsp and comma-wsp definitions
from the Basic Data Types and Interfaces chapter.
master/changes.html
master/definitions.xml
master/paths.html
--- a/master/changes.html	Thu May 22 23:14:48 2014 +0200
+++ b/master/changes.html	Mon May 26 10:45:44 2014 +0200
@@ -35,6 +35,9 @@
 
   <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>
+
 </ul>
 
 <h2 id="substantial">Substantial changes</h2>
--- a/master/definitions.xml	Thu May 22 23:14:48 2014 +0200
+++ b/master/definitions.xml	Mon May 26 10:45:44 2014 +0200
@@ -1220,7 +1220,6 @@
   <symbol name='FuncIRI' href='types.html#DataTypeFuncIRI'/>
   <symbol name='funciri' href='types.html#DataTypeFuncIRI'/>
   <symbol name='whitespace' href='types.html#DataTypeWhitespace'/>
-  <symbol name='white space' href='types.html#DataTypeWhitespace'/>
   <symbol name='XML-Name' href="types.html#DataTypeXML-Name"/>
   
   <!-- ... terms (these will be generated later) .......................... -->
@@ -1343,6 +1342,8 @@
   <term name='viewport' href='intro.html#TermViewport'/>
   <term name='viewport coordinate system' href='intro.html#TermViewportCoordinateSystem'/>
   <term name='viewport space' href='intro.html#TermViewportSpace'/>
+  <term name='comma-wsp' href='types.html#CommaWSP'/>
+  <term name='wsp' href='types.html#WSP'/>
 
   <!-- ... other, defined outside intro.html ... -->
   <term name='Animatable' href="animate.html#Animatable"/>
--- a/master/paths.html	Thu May 22 23:14:48 2014 +0200
+++ b/master/paths.html	Mon May 26 10:45:44 2014 +0200
@@ -886,15 +886,15 @@
 
 <pre class='grammar'>
 svg-path:
-    wsp* moveto-drawto-command-groups? wsp*
+    <a>wsp</a>* moveto-drawto-command-groups? <a>wsp</a>*
 moveto-drawto-command-groups:
     moveto-drawto-command-group
-    | moveto-drawto-command-group wsp* moveto-drawto-command-groups
+    | moveto-drawto-command-group <a>wsp</a>* moveto-drawto-command-groups
 moveto-drawto-command-group:
-    moveto wsp* drawto-commands?
+    moveto <a>wsp</a>* drawto-commands?
 drawto-commands:
     drawto-command
-    | drawto-command wsp* drawto-commands
+    | drawto-command <a>wsp</a>* drawto-commands
 drawto-command:
     closepath
     | lineto
@@ -907,69 +907,69 @@
     | elliptical-arc
     | bearing
 moveto:
-    ( "M" | "m" ) wsp* moveto-argument-sequence
+    ( "M" | "m" ) <a>wsp</a>* moveto-argument-sequence
 moveto-argument-sequence:
     coordinate-pair
-    | coordinate-pair comma-wsp? lineto-argument-sequence
+    | coordinate-pair <a>comma-wsp</a>? lineto-argument-sequence
 closepath:
     ("Z" | "z")
 lineto:
-    ( "L" | "l" ) wsp* lineto-argument-sequence
+    ( "L" | "l" ) <a>wsp</a>* lineto-argument-sequence
 lineto-argument-sequence:
     coordinate-pair
-    | coordinate-pair comma-wsp? lineto-argument-sequence
+    | coordinate-pair <a>comma-wsp</a>? lineto-argument-sequence
 horizontal-lineto:
-    ( "H" | "h" ) wsp* horizontal-lineto-argument-sequence
+    ( "H" | "h" ) <a>wsp</a>* horizontal-lineto-argument-sequence
 horizontal-lineto-argument-sequence:
     coordinate
-    | coordinate comma-wsp? horizontal-lineto-argument-sequence
+    | coordinate <a>comma-wsp</a>? horizontal-lineto-argument-sequence
 vertical-lineto:
-    ( "V" | "v" ) wsp* vertical-lineto-argument-sequence
+    ( "V" | "v" ) <a>wsp</a>* vertical-lineto-argument-sequence
 vertical-lineto-argument-sequence:
     coordinate
-    | coordinate comma-wsp? vertical-lineto-argument-sequence
+    | coordinate <a>comma-wsp</a>? vertical-lineto-argument-sequence
 curveto:
-    ( "C" | "c" ) wsp* curveto-argument-sequence
+    ( "C" | "c" ) <a>wsp</a>* curveto-argument-sequence
 curveto-argument-sequence:
     curveto-argument
-    | curveto-argument comma-wsp? curveto-argument-sequence
+    | curveto-argument <a>comma-wsp</a>? curveto-argument-sequence
 curveto-argument:
-    coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair
+    coordinate-pair <a>comma-wsp</a>? coordinate-pair <a>comma-wsp</a>? coordinate-pair
 smooth-curveto:
-    ( "S" | "s" ) wsp* smooth-curveto-argument-sequence
+    ( "S" | "s" ) <a>wsp</a>* smooth-curveto-argument-sequence
 smooth-curveto-argument-sequence:
     smooth-curveto-argument
-    | smooth-curveto-argument comma-wsp? smooth-curveto-argument-sequence
+    | smooth-curveto-argument <a>comma-wsp</a>? smooth-curveto-argument-sequence
 smooth-curveto-argument:
-    coordinate-pair comma-wsp? coordinate-pair
+    coordinate-pair <a>comma-wsp</a>? coordinate-pair
 quadratic-bezier-curveto:
-    ( "Q" | "q" ) wsp* quadratic-bezier-curveto-argument-sequence
+    ( "Q" | "q" ) <a>wsp</a>* quadratic-bezier-curveto-argument-sequence
 quadratic-bezier-curveto-argument-sequence:
     quadratic-bezier-curveto-argument
-    | quadratic-bezier-curveto-argument comma-wsp? 
+    | quadratic-bezier-curveto-argument <a>comma-wsp</a>? 
         quadratic-bezier-curveto-argument-sequence
 quadratic-bezier-curveto-argument:
-    coordinate-pair comma-wsp? coordinate-pair
+    coordinate-pair <a>comma-wsp</a>? coordinate-pair
 smooth-quadratic-bezier-curveto:
-    ( "T" | "t" ) wsp* smooth-quadratic-bezier-curveto-argument-sequence
+    ( "T" | "t" ) <a>wsp</a>* smooth-quadratic-bezier-curveto-argument-sequence
 smooth-quadratic-bezier-curveto-argument-sequence:
     coordinate-pair
-    | coordinate-pair comma-wsp? smooth-quadratic-bezier-curveto-argument-sequence
+    | coordinate-pair <a>comma-wsp</a>? smooth-quadratic-bezier-curveto-argument-sequence
 elliptical-arc:
-    ( "A" | "a" ) wsp* elliptical-arc-argument-sequence
+    ( "A" | "a" ) <a>wsp</a>* elliptical-arc-argument-sequence
 elliptical-arc-argument-sequence:
     elliptical-arc-argument
-    | elliptical-arc-argument comma-wsp? elliptical-arc-argument-sequence
+    | elliptical-arc-argument <a>comma-wsp</a>? elliptical-arc-argument-sequence
 elliptical-arc-argument:
-    number comma-wsp? number comma-wsp? 
-        number comma-wsp flag comma-wsp? flag comma-wsp? coordinate-pair
+    number <a>comma-wsp</a>? number <a>comma-wsp</a>? 
+        number <a>comma-wsp</a> flag <a>comma-wsp</a>? flag <a>comma-wsp</a>? coordinate-pair
 bearing:
-    ( "B" | "b") wsp* bearing-argument-sequence
+    ( "B" | "b") <a>wsp</a>* bearing-argument-sequence
 bearing-argument-sequence:
     number
-    | number comma-wsp? bearing-argument-sequence
+    | number <a>comma-wsp</a>? bearing-argument-sequence
 coordinate-pair:
-    coordinate comma-wsp? coordinate
+    coordinate <a>comma-wsp</a>? coordinate
 coordinate:
     number
 nonnegative-number:
@@ -980,10 +980,6 @@
     | sign? floating-point-constant
 flag:
     "0" | "1"
-comma-wsp:
-    (wsp+ comma? wsp*) | (comma wsp*)
-comma:
-    ","
 integer-constant:
     digit-sequence
 floating-point-constant:
@@ -1001,8 +997,6 @@
     | digit digit-sequence
 digit:
     "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
-wsp:
-    (#x20 | #x9 | #xD | #xA)
 </pre>
 
 <p>The processing of the BNF must consume as much of a given