Re: [Bug 24769] New: SVG Path BNF is ambigious


I'm no expert in BNF notations, but the '|' obviously means only 'or'
and 'a or b' or 'b or a' is equivalent. Per meaning of 'or' the order in
such a list implies never an order of importance or relevance or preference.
Because many W3C recommendations (for example) CSS use
a similar syntax of '|' without implying an order, all these should
be in trouble, in case the bug applies.

About nonnegative-number:
In the given example one has the alternative between integers
and floating point numbers.
Examples for an integer according to the BNF: 117, 000117
According to the definition of the floating point number, one can
note for example: 117E0, .117E+3, 11700e-2, 117., 117.0,  000117., 
but not 117 or 000117

About number:
The examples above apply as well, one just can add an additional
sign: +117, -117
and +117., -117. etc

By analysing the number, it should be always possible to decide,
which alternative is noted, in case this matters.

Can you give an example for an ambiguity, where a rule like
'first match wins' would be meaningful or helpful for something?
I think, if this is the case and causes a difference for presentation,
indeed, this might be not intended for paths.

If we have for example 'M117 117.'
Does it really matter, that the first one is noted as integer, the second as 
floating point number? For analysing coordinate pairs after M, I think it
is not relevant for presentation, if all coordinates are interpreted as 
floating point numbers to simplify  processing of the data.


Received on Saturday, 22 February 2014 14:25:31 UTC