Skip to content

WIP: Parser and Code Generator for the Concise Data Definition Language (CDDL)

License

Notifications You must be signed in to change notification settings

HannesKimara/cddlc

Repository files navigation

CDDL

Build status GoDoc

Golang implementation for Concise Data Definition Language (CDDL). CDDL is an IETF standard whose main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.

Warning
This repository is still in active development and may introduce breaking changes. Do not use in production

Installation

Go library

go get -u github.com/HannesKimara/cddlc

cddlc tool

go install github.com/HannesKimara/cddlc/cmd/cddlc@latest

Getting Started

cddlc demo

To get started using the parser library visit the docs. The docs to the cddlc tool are available here

Supported features

CDDL Parser Code Generator
identifiers
(basic, hyphen-separated, *weird..ones ...)
☑*
primitives
(bool, false, true, tstr, text, "text_literal", float, float16, float32, float64, uint, int, nint, bstr, bytes, null/nil)
occurrence operators
(*, +, ?)
choice operators
(/, //)
composition operators
(~)
comparable control operators
(.lt, .le, .gt, .ge, .eq, .ne)
constraint control operators
(.size, .regexp)
collections
(groups (), arrays [], structs {})

Note
* means that the cddl construct may not be fully supported in a particular context such as identifer translation during code generation.

License

This project is licensed under the Apache-2.0 license. Please see the LICENSE file for more details.

About

WIP: Parser and Code Generator for the Concise Data Definition Language (CDDL)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published