Repository navigation
Spdx.Expressions 1.2.0 lets applications parse an SPDX expression once and check it against different resource limits. The library targets .NET 10, has no runtime package dependencies and retains the embedded SPDX 3.29.0 catalogue.
Parser limits
SpdxExpressionParser.CheckLimitschecks a successful parse in constant time. It returnsnullwhen the original expression fits the supplied limits.SpdxDiagnostic.Limitidentifies the exceeded budget, its inclusive limit, the observed value and whether the measurement is exact or a lower bound. The diagnostic retains the original source span.- The checks cover input length, identifier length, token count, syntax node count and parenthesis depth.
Rechecking a successful parse gives the same admission result as parsing the original text under those limits. If several limits are exceeded, the first diagnostic and its position can differ.
Install
dotnet add package Spdx.Expressions --version 1.2.0NuGet package · Syntax and limits · Examples · Changes since 1.1.1
Build and test passed on Linux, Windows and macOS for the release commit.