spdx / spdx-spec

The SPDX specification in MarkDown and HTML formats.
https://spdx.github.io/spdx-spec/
Other
274 stars 133 forks source link

Swapped words in D.4.5 #843

Closed tomjmech closed 1 year ago

tomjmech commented 1 year ago

In D.4.5 Order of precedence and parentheses:

where a lower order operator is applied before a higher order operator.

shouldn't the words 'lower' and 'higher' be swapped?

zvr commented 1 year ago

I don't think so, @tomjmech. The "order" mentioned here is according to the list presented just before this sentence.

I agree it's confusing having this order being the reverse of precedence (lower order means higher precedence), but at least it's correct.

tomjmech commented 1 year ago

As far as I understand, in the list, lower order means lower precedence. That is also consistent with the first example right after:

LGPL-2.1-only OR BSD-3-Clause AND MIT

is equivalent to

LGPL-2.1-only OR (BSD-3-Clause AND MIT)
zvr commented 1 year ago

Huh? The list is +, WITH, AND, OR. So AND has a lower order (3rd position) than OR (4th position).

As the example shows, AND has higher precedence than OR, since it binds more closely making x OR y AND z meaning x OR (y AND z).

tomjmech commented 1 year ago

Ah, I understand what you mean now. I was thinking visually (where OR is the lowest in order and + is the highest in order).