W3C home > Mailing lists > Public > www-svg@w3.org > February 2004

SVG 1.1 paths BNF errata

From: Johan Sundström <jhs@lysator.liu.se>
Date: Fri, 6 Feb 2004 23:19:37 +0100 (MET)
To: www-svg@w3.org
Message-ID: <Pine.GSO.4.51L2.0402062304220.23561@koeberg.lysator.liu.se>

Hi!

Not that this constitutes any major BNF flaw, but the moveto-argument-sequence
has a rather fishy cut'n'paste:o-ish reference to lineto-argument-sequence for
no apparent reason -- quoting relevant parts:

[http://www.w3.org/TR/SVG/paths.html#PathDataBNF]

moveto:
    ( "M" | "m" ) wsp* moveto-argument-sequence
moveto-argument-sequence:
    coordinate-pair
    | coordinate-pair comma-wsp? lineto-argument-sequence
                                 ^^^^
lineto:
    ( "L" | "l" ) wsp* lineto-argument-sequence
lineto-argument-sequence:
    coordinate-pair
    | coordinate-pair comma-wsp? lineto-argument-sequence

It was probably intended to read moveto-argument-sequence there, or, if not,
the grammar for moveto: could be rid of its moveto-argument-sequence rule and
refer to lineto-argument-sequence rule right away, as in:

moveto:
    ( "M" | "m" ) wsp* lineto-argument-sequence

(Though I presume that kind of "optimisation" is not intentional, or it would
have been applied in lots of different other places throughout the BNF.)

-- 
 / Johan Sundström (Lysator Academic Computer Society)
Received on Friday, 6 February 2004 20:30:04 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:26 GMT