On Tue, Apr 21, 2015 at 7:12 PM, <[email protected]> wrote:
> Here is the revised syntax for ABNF, please let us know
> if there are any concerns.
>
> license-id = <short form license identifier in Appendix I.1>
> license-exception-id = <short form license exception identifier in Appendix
> I.2>
> license-ref = "LicenseRef-"1*(ALPHA / DIGIT / "-" / "." )
> simple-expression = license-id / license-id"+" / license-ref
> compound-expression = 1*(simple-expression /
> simple-expression "WITH" license-exception-id /
> compound-expression "AND" compound-expression /
> compound-expression "OR" compound-expression ) /
> "(" compound-expression ")" )
>
> license-expression = 1*1(simple-expression / compound-expression)
May I suggest this alternative and slightly different grammar:
expression = license / and-expression / or-expression /
"(" expression ")"
and-expression = expression "AND" expression
or-expression = expression "OR" expression
license = license-id / license-ref / license-with-exception
license-id = identifier["+"] ; short form SPDX license
identifier with optional + for "or later"
license-ref = "LicenseRef-"identifier
exception-id = identifier ; short form SPDX license
exception identifier
license-with-exception = (license-id / license-ref) "WITH" exception-id
identifier = alphanum[*(aphanum / punct)]
alphanum = ALPHA / DIGIT
punct = "-" / "."
The difference is that an identifier is defined as starting with a
letter or digit and this is specified for refs, id and an exception
ids.
--
Cordially
Philippe Ombredanne
_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech