svg-path = *wsp [ moveto-drawto-command-groups ] *wsp moveto-drawto-command-groups = moveto-drawto-command-group / moveto-drawto-command-group *wsp moveto-drawto-command-groups moveto-drawto-command-group = moveto *wsp [ drawto-commands ] drawto-commands = drawto-command / drawto-command *wsp drawto-commands drawto-command = closepath / lineto / horizontal-lineto / vertical-lineto / curveto / smooth-curveto / quadratic-bezier-curveto / smooth-quadratic-bezier-curveto / elliptical-arc moveto = ( "M" ) *wsp moveto-argument-sequence moveto-argument-sequence = coordinate-pair / coordinate-pair [ comma-wsp ] lineto-argument-sequence closepath = ( "Z" ) lineto = ( "L" ) *wsp lineto-argument-sequence lineto-argument-sequence = coordinate-pair / coordinate-pair [ comma-wsp ] lineto-argument-sequence horizontal-lineto = ( "H" ) *wsp horizontal-lineto-argument-sequence horizontal-lineto-argument-sequence = coordinate / coordinate [ comma-wsp ] horizontal-lineto-argument-sequence vertical-lineto = ( "V" ) *wsp vertical-lineto-argument-sequence vertical-lineto-argument-sequence = coordinate / coordinate [ comma-wsp ] vertical-lineto-argument-sequence curveto = ( "C" ) *wsp curveto-argument-sequence curveto-argument-sequence = curveto-argument / curveto-argument [ comma-wsp ] curveto-argument-sequence curveto-argument = coordinate-pair [ comma-wsp ] coordinate-pair [ comma-wsp ] coordinate-pair smooth-curveto = ( "S" ) *wsp smooth-curveto-argument-sequence smooth-curveto-argument-sequence = smooth-curveto-argument / smooth-curveto-argument [ comma-wsp ] smooth-curveto-argument-sequence smooth-curveto-argument = coordinate-pair [ comma-wsp ] coordinate-pair quadratic-bezier-curveto = ( "Q" ) *wsp quadratic-bezier-curveto-argument-sequence quadratic-bezier-curveto-argument-sequence = quadratic-bezier-curveto-argument / quadratic-bezier-curveto-argument [ comma-wsp ] quadratic-bezier-curveto-argument-sequence quadratic-bezier-curveto-argument = coordinate-pair [ comma-wsp ] coordinate-pair smooth-quadratic-bezier-curveto = ( "T" ) *wsp smooth-quadratic-bezier-curveto-argument-sequence smooth-quadratic-bezier-curveto-argument-sequence = coordinate-pair / coordinate-pair [ comma-wsp ] smooth-quadratic-bezier-curveto-argument-sequence elliptical-arc = ( "A" ) *wsp elliptical-arc-argument-sequence elliptical-arc-argument-sequence = elliptical-arc-argument / elliptical-arc-argument [ comma-wsp ] elliptical-arc-argument-sequence elliptical-arc-argument = nonnegative-number [ comma-wsp ] nonnegative-number [ comma-wsp ] number comma-wsp flag comma-wsp flag comma-wsp coordinate-pair coordinate-pair = coordinate [ comma-wsp ] 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 "." exponent = ( "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)