- From: SVG Working Group repository <cam+svgwgrepo@mcc.id.au>
- Date: Mon, 26 May 2014 01:49:19 -0700
- To: public-svg-wg@w3.org
details: https://svgwg.org/hg/svg2/rev/e62e8a7376a0 branches: changeset: 679:e62e8a7376a0 user: Erik Dahlstrom <ed@opera.com> date: Mon May 26 10:45:44 2014 +0200 description: Make path data grammar reference the wsp and comma-wsp definitions from the Basic Data Types and Interfaces chapter. diffstat: master/changes.html | 3 ++ master/definitions.xml | 3 +- master/paths.html | 66 ++++++++++++++++++++++--------------------------- 3 files changed, 35 insertions(+), 37 deletions(-) diffs (230 lines): diff --git a/master/changes.html b/master/changes.html --- a/master/changes.html +++ b/master/changes.html @@ -30,16 +30,19 @@ Changes made since the last <a href="htt <p>A number of stylistic changes have been made to the specification to make it more readable. These include the following:</p> <ul> <li>A change towards using styling similar to contemporary CSS specifications.</li> <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> <p>In additional to the editorial changes listed above, the following substantial additions, changes and removals have been made.</p> <h3 id="whole">Across the whole document</h3> diff --git a/master/definitions.xml b/master/definitions.xml --- a/master/definitions.xml +++ b/master/definitions.xml @@ -1215,17 +1215,16 @@ <symbol name='shape-box' href='http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/#typedef-shape-box'/> <symbol name='time' href='types.html#DataTypeTime'/> <symbol name='transform-list' href='types.html#DataTypeTransformList'/> <symbol name='iri' href='types.html#DataTypeIRI'/> <symbol name='url' href='types.html#DataTypeIRI'/> <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) .......................... --> <!-- ... elements, in alphabetic order ... --> <term name='animation element' href='intro.html#TermAnimationElement'/> <term name='animation elements' href='intro.html#TermAnimationElement'/> <term name='container element' href='intro.html#TermContainerElement'/> <term name='container elements' href='intro.html#TermContainerElement'/> @@ -1338,16 +1337,18 @@ <term name='user agent' href='intro.html#TermUserAgent'/> <term name='user agents' href='intro.html#TermUserAgent'/> <term name='user coordinate system' href='intro.html#TermUserCoordinateSystem'/> <term name='user space' href='intro.html#TermUserSpace'/> <term name='user units' href='intro.html#TermUserUnits'/> <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"/> <term name='equivalent path' href='paths.html#TermEquivalentPath'/> <term name='initial coordinate system' href='coords.html#InitialCoordinateSystem'/> <term name='inherit' href='http://www.w3.org/TR/2008/REC-CSS2-20080411/cascade.html#value-def-inherit'/> <term name='object bounding box units' href='coords.html#ObjectBoundingBoxUnits'/> <term name='simple alpha compositing' href='masking.html#SimpleAlphaBlending'/> diff --git a/master/paths.html b/master/paths.html --- a/master/paths.html +++ b/master/paths.html @@ -881,114 +881,110 @@ description of the grammar for path data <li>|: separates alternatives</li> <li>double quotes surround literals</li> </ul> <p>The following is the BNF for SVG paths.</p> <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 | horizontal-lineto | vertical-lineto | curveto | smooth-curveto | quadratic-bezier-curveto | smooth-quadratic-bezier-curveto | 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: integer-constant | floating-point-constant number: sign? integer-constant | sign? floating-point-constant flag: "0" | "1" -comma-wsp: - (wsp+ comma? wsp*) | (comma wsp*) -comma: - "," integer-constant: digit-sequence floating-point-constant: fractional-constant exponent? | digit-sequence exponent fractional-constant: digit-sequence? "." digit-sequence | digit-sequence "." @@ -996,18 +992,16 @@ exponent: ( "e" | "E" ) sign? digit-sequence sign: "+" | "-" digit-sequence: digit | 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 BNF production as possible, stopping at the point when a character is encountered which no longer satisfies the production. Thus, in the string "M 100-200", the first coordinate for the "moveto" consumes the characters "100" and stops upon encountering the minus sign because the minus sign
Received on Monday, 26 May 2014 08:49:46 UTC