https://bugs.linuxfoundation.org/show_bug.cgi?id=1334

            Bug ID: 1334
           Summary: Simplify grammar in Appendix IV?
           Product: SPDX
           Version: 2.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Spec
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

>From David Wheeler on December 4, 2015

The current Appendix IV is also overly complex and confusing:

* There's no need to have "compound-expression" as separate from
"license-expression".

The "license-expression" is defined to be either simple or compound, but a
simple-expression is also a legal compound-expression, so the whole indirection
is unnecessary and confusing.

* In simple-expression, the "+" should just optionally follow license-id;
that's how anyone would parse it, and it's easier to explain too.



So I suggest replacing simple-expression, compound-expression (to be removed),
and license-expression with this simpler spec:



simple-expression = license-id ["+"] / license-ref

license-expression =   simple-expression [ "WITH" license-exception-id ] /

  license-expression "AND" license-expression /

  license-expression "OR" license-expression /

  "(" license-expression ")"



You could change simple-expression to be:

simple-expression = license-id ["+"][ "WITH" license-exception-id ] /
license-ref and omit the ["WITH...] in the following line, but I *like* the
idea of allowing a license-ref with a standard exception. Besides, that's
currently allowed, no reason to *remove* this functionality.

Both this and the original description are silent about left-to-right or
right-to-left; I don't think it matters, but if someone wants things to be
parsed identically, perhaps that should be mentioned.



I can imagine adding suffixes like "!" (I'm *sure* it's only this particular
version of the license) or "?" (I'm *not* sure that it's limited to this
particular version of the license), in addition to "+".

However, that's a separate discussion.




Also: is there any reason to *FORBID* the "+" suffix after a license-ref or
license-exception-id?



In particular, someone might use a license-ref while waiting for a license to
be added to the SPDX license list or exception list.



A way Would change my proposal grammar above to:

simple-expression = license-id / license-ref

license-expression =   simple-expression ["+"] [ "WITH" license-exception-id
["+"] ] /

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech

Reply via email to