Skip to content

Commit d7b698a

Browse files
committed
allow and, or and with operators
This is follow up of discussion https://lists.spdx.org/g/spdx/message/1798 where this was found as good compromise https://lists.spdx.org/g/spdx/message/1817 Signed-off-by: Miroslav Suchý <[email protected]>
1 parent 6171b39 commit d7b698a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/annexes/SPDX-license-expressions.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ addition-expression = license-exception-id / addition-ref
2525
2626
compound-expression = (simple-expression /
2727
28-
simple-expression "WITH" addition-expression /
28+
simple-expression ( "WITH" / "with" ) addition-expression /
2929
30-
compound-expression "AND" compound-expression /
30+
compound-expression ( "AND" / "and" ) compound-expression /
3131
32-
compound-expression "OR" compound-expression /
32+
compound-expression ( "OR" / "or" ) compound-expression /
3333
3434
"(" compound-expression ")" )
3535
@@ -50,7 +50,7 @@ In the `tag:value` format, a license expression MUST be on a single line, and MU
5050

5151
## D.2 Case sensitivity <a name="D.2"></a>
5252

53-
License expression operators (`AND`, `OR` and `WITH`) should be matched in a *case-sensitive* manner.
53+
License expression operators (`AND`, `and`, `OR`, `or`, `WITH` and `with`) should be matched in a *case-sensitive* manner, i.e., letters must be all upper case or all lower case.
5454

5555
License identifiers (including license exception identifiers) used in SPDX documents or source code files should be matched in a *case-insensitive* manner. In other words, `MIT`, `Mit` and `mIt` should all be treated as the same identifier and referring to the same license.
5656

@@ -109,6 +109,8 @@ An example representing a choice between three different licenses would be:
109109
LGPL-2.1-only OR MIT OR BSD-3-Clause
110110
```
111111

112+
It is allowed to use the operator in lower case form `or`.
113+
112114
### D.4.3 Conjunctive "AND" operator <a name="D.4.3"></a>
113115

114116
If required to simultaneously comply with two or more licenses, use the conjunctive binary "AND" operator to construct a new license expression, where both the left and right operands are a valid license expression values.
@@ -131,6 +133,8 @@ An example where all three different licenses apply would be:
131133
LGPL-2.1-only AND MIT AND BSD-2-Clause
132134
```
133135

136+
It is allowed to use the operator in lower case form `and`.
137+
134138
### D.4.4 Additive "WITH" operator <a name="D.4.4"></a>
135139

136140
Sometimes license texts are found with additional text, which might or might not modify the original license terms.
@@ -148,6 +152,8 @@ GPL-2.0-or-later WITH Bison-exception-2.2
148152

149153
The current set of valid license exceptions identifiers can be found in [spdx.org/licenses](https://spdx.org/licenses).
150154

155+
It is allowed to use the operator in lower case form `with`.
156+
151157
### D.4.5 Order of precedence and parentheses <a name="D.4.5"></a>
152158

153159
The order of application of the operators in an expression matters (similar to mathematical operators). The default operator order of precedence of a `<license-expression>` a is:

0 commit comments

Comments
 (0)