Support NONE and NOASSERTION in license expressions
@pmonks @bact - thanks for the review and comments.
You're correct in that these are not officially part of the spec. There's a tool out there that's generating these expressions and the library creates a really bad error message.
I should probably change the code to just generate a decent error message rather than succeeding - hopefully we can add this to 3.1.
It is possible that the code for 3.0 here (and its expression) will become valid, if eventually at some point NOASSERTION and NONE are added to the SPDX License List (without the need of spec amendment (3.1?)).
Alternatively, if it is not preferred to have NOASSERTION and NONE as a license-id in the SPDX License List, it maybe possible to:
- define "LicenseRef-NOASSERTION" and "LicenseRef-NONE" as special instances of LicenseRef, to represent NOASSERTION and NONE; or
- define NOASSERTION and NONE as a special token in the expression syntax
Both (1) and (2) require the spec amendment.
Fixing the error message turned out to be problematic.
I'll switch this PR to draft mode awaiting the outcome of the discussion on license expressions.