Library
Module
Module type
Parameter
Class
Class type
"DocumentRef-" idstring ":"
"LicenseRef-" idstring
type simple_license =
| LicenseID of string
license-id
*)| LicenseIDPlus of string
license-id '+' (the '+' isn't contained in the string)
*)| LicenseRef of user_defined_license
A SPDX user defined license reference
*)simple-expression
type t =
| Simple of simple_license
simple-expression
*)| WITH of simple_license * string
simple-expression "WITH" license-exception-id
*)| AND of t * t
compound-expression "AND" compound-expression
*)| OR of t * t
compound-expression "OR" compound-expression
*)license-expression
The errors returned by the parser
parse str
parses str
according to the syntax described in: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/
val to_string : t -> string
to_string license
returns a normalized string corresponding to license
in a valid SPDX license expression format.
valid_license_ids
gives the list of valid license IDs. The list does not contain deprecated licenses. See Appendix I.1: https://spdx.github.io/spdx-spec/appendix-I-SPDX-license-list/