Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CDDL compile errors and improve formatting of CCF specs document #10

Merged
merged 4 commits into from
Nov 29, 2022

Conversation

turbolent
Copy link
Collaborator

  • Add language to code fences (e.g. for JSON)
  • Move CDDL to separate file and fix problems reported by https://github.com/anweiss/cddl:
    • + is not a sequencing operator according to the CDDL spec, sequencing seems to be just the default operation (no operator)
    • According to the spec, CBOR tags unfortunately need to be numeric, the syntax is required to be #6.nnn, the tag cannot be symbolic. Still, define names and refer to them in comments
    • Tag content cannot be a name/value pair, see change to CCF_TypeRef

Maybe we can run cddl compile-cddl --cddl ccf.cddl on CI?

@fxamacker
Copy link
Owner

Great work! 👍. Some thoughts:

  • Really love your suggestion to use CI to test CDDL and thanks for suggesting https://github.com/anweiss/cddl

  • CDDL definition is the heart of the specs, so I would prefer we keep the CDDL inside a single markdown file and use CI to automatically extract and test the CDDL.

We can add a pair of CDDL comments to make it easy for CI to extract CDDL using sed or grep easier:

;CDDL-BEGIN
... 
;CDDL-END 

I can push a commit to do it this way unless you have any objections. Thoughts?

@turbolent
Copy link
Collaborator Author

@fxamacker Sounds good! Moved the CDDL back

@fxamacker fxamacker merged commit da4015e into main Nov 29, 2022
@fxamacker fxamacker changed the title Fix and move CDDL to separate file Fix CDDL compile errors and improve formatting of CCF specs document Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants