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

On Fri, Feb 21, 2014 at 12:33 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Tab Atkins Jr. wrote:
>>On Fri, Feb 21, 2014 at 12:03 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
>>> An `integer-constant` is a `digit-sequence` while a `floating-point-
>>> constant` is either a `fractional-constant` followed by an optional
>>> exponent, or a `digit-sequence` followed by a mandatory exponent. A
>>> `fractional-constant` must include `.`, so either a `.` or an expo-
>>> nent's `e` resolve the choice, and it does not seem like either is
>>> a prefix to a following rule. Could you give an example string that
>>> has more than one parse tree?
>>
>>The issue is that the order isn't defined *at all* currently; the spec
>>doesn't even have an *internal* ordering that it defines and follows.
>
> So far my impression is that the issue is one of editorial preference
> and not a technical problem with the specification.

Perhaps reread the bug?  The opening paragraph is:

"There is no description in the text on how this BNF is to be used. For example,
are the rules for the BNF alternatives to be parsed as 'first match wins'?"

There is a technical issue, in that it's not defined how to read the
grammar to deal with ambiguous situations, and at least one reasonable
method of reading it leads to an obviously bad result.

~TJ

Received on Friday, 21 February 2014 20:38:10 UTC