Support CDDL dfns, extract standard prelude from CDDL RFC #1750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New types of definitions will soon be introduced in Bikeshed to deal with CDDL blocks: cddl-module, cddl-type, cddl-parameter, cddl-key, cddl-value. The extraction now considers that these definition types are valid.
To be able to reference CDDL types defined in the standard prelude, a pre-processing step is also added for the CDDL RFC (RFC8610). To avoid creating multiple definitions with the same
id
andhref
, which could perhaps confuse consuming tools (?), all types defined in the standard prelude get attached as different linking text to the same cddl-type dfn, leading to the following dfns extract:I note it would be easy to create one definition per CDDL type otherwise... but then they would have the same
id
and samehref
. In practice, I do not know whether that would be a problem for anyone (we don't guarantee that dfns have unique IDs per se, although that should be the case unless a spec incorrectly reuses an ID in more than one dfn).