cddlc 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cddlc.gemspec +2 -2
- data/data/rfc9581.cddl +118 -0
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3ebce64393cf5518aaaf97d1257771e4b0a7e0f3318f0c1ba7a2c0a3342de9f
|
4
|
+
data.tar.gz: 6dd472b20440724ce78aa6bc87a858b29d8b81b8137b7f583afed016285e0e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31b74e7d6fc4fce123d2289c7323d8dcbc91704f16851c509938bc89d786a4850c8abd373247c931c1a5a078e310ab0b539900b514626d8dcaa24e5c33fb3067
|
7
|
+
data.tar.gz: a3c9e1683b8bf909cd4c946b2396794172fd1c6f8d66814af36bb209ab65524da4c5f61b920d0836b91d39d53bd7c784156b22989e99946c166b34c6b3dca0f3
|
data/cddlc.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cddlc"
|
3
|
-
s.version = "0.3.
|
3
|
+
s.version = "0.3.4"
|
4
4
|
s.summary = "CDDL (Concise Data Definition Language) converters and miscellaneous tools"
|
5
5
|
s.description = %q{cddlc implements converters and miscellaneous tools for CDDL, RFC 8610}
|
6
6
|
s.author = "Carsten Bormann"
|
@@ -15,6 +15,6 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_development_dependency 'bundler', '~>1'
|
17
17
|
s.add_dependency 'treetop', '~>1'
|
18
|
-
s.add_dependency 'json', '~>2'
|
18
|
+
# s.add_dependency 'json', '~>2'
|
19
19
|
s.add_dependency 'neatjson', '~>0.10'
|
20
20
|
end
|
data/data/rfc9581.cddl
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
Etime = #6.1001(etime-detailed)
|
2
|
+
|
3
|
+
etime-framework = {
|
4
|
+
uint => any ; at least one base time
|
5
|
+
* (nint/text) => any ; elective supplementary information
|
6
|
+
* uint => any ; critical supplementary information
|
7
|
+
}
|
8
|
+
|
9
|
+
etime-detailed = ({
|
10
|
+
$$ETIME-BASETIME
|
11
|
+
ClockQuality-group
|
12
|
+
* $$ETIME-ELECTIVE
|
13
|
+
* $$ETIME-CRITICAL
|
14
|
+
* ((nint/text) .feature "etime-elective-extension") => any
|
15
|
+
* (uint .feature "etime-critical-extension") => any
|
16
|
+
}) .within etime-framework
|
17
|
+
|
18
|
+
|
19
|
+
$$ETIME-BASETIME //= (1: ~time)
|
20
|
+
|
21
|
+
|
22
|
+
$$ETIME-BASETIME //= (4: ~decfrac)
|
23
|
+
$$ETIME-BASETIME //= (5: ~bigfloat)
|
24
|
+
|
25
|
+
|
26
|
+
$$ETIME-ELECTIVE //= (-3: uint)
|
27
|
+
$$ETIME-ELECTIVE //= (-6: uint)
|
28
|
+
$$ETIME-ELECTIVE //= (-9: uint)
|
29
|
+
$$ETIME-ELECTIVE //= (-12: uint)
|
30
|
+
$$ETIME-ELECTIVE //= (-15: uint)
|
31
|
+
$$ETIME-ELECTIVE //= (-18: uint)
|
32
|
+
|
33
|
+
|
34
|
+
$$ETIME-ELECTIVE //= (-1 => $ETIME-TIMESCALE)
|
35
|
+
$$ETIME-ELECTIVE //= (-13 => $ETIME-TIMESCALE)
|
36
|
+
$$ETIME-CRITICAL //= (13 => $ETIME-TIMESCALE)
|
37
|
+
|
38
|
+
$ETIME-TIMESCALE /= &(etime-utc: 0)
|
39
|
+
$ETIME-TIMESCALE /= &(etime-tai: 1)
|
40
|
+
|
41
|
+
|
42
|
+
ClockQuality-group = (
|
43
|
+
? &(ClockClass: -2) => uint .size 1 ; PTP/RFC8575
|
44
|
+
? &(ClockAccuracy: -4) => uint .size 1 ; PTP/RFC8575
|
45
|
+
? &(OffsetScaledLogVariance: -5) => uint .size 2 ; PTP/RFC8575
|
46
|
+
? &(Uncertainty: -7) => ~time/~duration
|
47
|
+
? &(Guarantee: -8) => ~time/~duration
|
48
|
+
)
|
49
|
+
|
50
|
+
|
51
|
+
$$ETIME-ELECTIVE //= (-10: time-zone-info)
|
52
|
+
$$ETIME-CRITICAL //= (10: time-zone-info)
|
53
|
+
|
54
|
+
time-zone-info = tstr .abnf
|
55
|
+
("time-zone-name / time-numoffset" .det IXDTFtz)
|
56
|
+
IXDTFtz = '
|
57
|
+
time-hour = 2DIGIT ; 00-23
|
58
|
+
time-minute = 2DIGIT ; 00-59
|
59
|
+
time-numoffset = ("+" / "-") time-hour ":" time-minute
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
time-zone-initial = ALPHA / "." / "_"
|
64
|
+
time-zone-char = time-zone-initial / DIGIT / "-" / "+"
|
65
|
+
time-zone-part = time-zone-initial *time-zone-char
|
66
|
+
; but not "." or ".."
|
67
|
+
time-zone-name = time-zone-part *("/" time-zone-part)
|
68
|
+
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
69
|
+
DIGIT = %x30-39 ; 0-9
|
70
|
+
' ; extracted from [RFC9557] and [RFC3339]
|
71
|
+
|
72
|
+
|
73
|
+
$$ETIME-ELECTIVE //= (-11: suffix-info-map)
|
74
|
+
$$ETIME-CRITICAL //= (11: suffix-info-map)
|
75
|
+
|
76
|
+
suffix-info-map = { * suffix-key => suffix-values }
|
77
|
+
suffix-key = tstr .abnf ("suffix-key" .det IXDTF)
|
78
|
+
suffix-values = one-or-more<suffix-value>
|
79
|
+
one-or-more<T> = T / [ 2* T ]
|
80
|
+
suffix-value = tstr .abnf ("suffix-value" .det IXDTF)
|
81
|
+
|
82
|
+
IXDTF = '
|
83
|
+
key-initial = lcalpha / "_"
|
84
|
+
key-char = key-initial / DIGIT / "-"
|
85
|
+
suffix-key = key-initial *key-char
|
86
|
+
|
87
|
+
suffix-value = 1*alphanum
|
88
|
+
alphanum = ALPHA / DIGIT
|
89
|
+
lcalpha = %x61-7A
|
90
|
+
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
91
|
+
DIGIT = %x30-39 ; 0-9
|
92
|
+
' ; extracted from [RFC9557]
|
93
|
+
|
94
|
+
|
95
|
+
Duration = #6.1002(etime-detailed)
|
96
|
+
|
97
|
+
|
98
|
+
simple-Period = #6.1003([
|
99
|
+
start: ~Etime / null
|
100
|
+
end: ~Etime / null
|
101
|
+
? duration: ~Duration
|
102
|
+
])
|
103
|
+
|
104
|
+
|
105
|
+
Period = #6.1003([
|
106
|
+
(start: ~Etime,
|
107
|
+
((end: ~Etime) //
|
108
|
+
(end: null,
|
109
|
+
duration: ~Duration))) //
|
110
|
+
(start: null,
|
111
|
+
end: ~Etime,
|
112
|
+
duration: ~Duration)
|
113
|
+
])
|
114
|
+
|
115
|
+
|
116
|
+
etime = #6.1001({* (int/tstr) => any})
|
117
|
+
duration = #6.1002({* (int/tstr) => any})
|
118
|
+
period = #6.1003([~etime/null, ~etime/null, ?~duration])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cddlc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: json
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: neatjson
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,6 +88,7 @@ files:
|
|
102
88
|
- data/rfc9393-sign1.cddl
|
103
89
|
- data/rfc9393-tags.cddl
|
104
90
|
- data/rfc9393.cddl
|
91
|
+
- data/rfc9581.cddl
|
105
92
|
- lib/cddlc.rb
|
106
93
|
- lib/parser/cddl-util.rb
|
107
94
|
- lib/parser/cddlgrammar.rb
|
@@ -130,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
117
|
- !ruby/object:Gem::Version
|
131
118
|
version: '0'
|
132
119
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.5.14
|
134
121
|
signing_key:
|
135
122
|
specification_version: 4
|
136
123
|
summary: CDDL (Concise Data Definition Language) converters and miscellaneous tools
|