cddl 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b75dfee163242854b4a139d3a6e84710d9ac31702e57e502ac125b1b5e9dc944
4
- data.tar.gz: 4a5360b99c364b7cd6c1aa518a332e79616e65331a95243ba2406a8d04712639
3
+ metadata.gz: 73391c15e100fe86614bce5277a63cf8d7032754e7a7e05f8eb4cc1ce074beae
4
+ data.tar.gz: 26734d7b7677595eb88b9f970b5d4986991cc1afc9841bc9c3c1f3bc5237c4a8
5
5
  SHA512:
6
- metadata.gz: 1127b09451324ff3842890e59e077c96f3c248082c9dac7f194f453faf88d0c9ffc8e7326c8087677ec953c03b62cbe50e582a2d8362876e57375289453ab3e4
7
- data.tar.gz: 74ce9832d9a84dd4204411beecd9b029ddb76eacbc9e09e2056512310cbdb4309d439360d9bc1bf6c86ca60a87b7ca3423f9ef8471481657bda327f816b4426b
6
+ metadata.gz: 151f3e6374672a6b1c4211363ac90a7fb46814639f45d65a7fc85722c9b48cbc73d4e1919a8a3ddba574e4957f1b74b9d8105fdb0bb697f351a9069af222d742
7
+ data.tar.gz: 5d33838dfc0ff62d14f736d14108936100e638f5a1b73c5af9119a81a1ab7264369ce8059c95223347c756d4e73e7d38cd975ac8ae3387ed259e65edeee75610
data/cddl.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'cddl'
3
- s.version = '0.11.1'
3
+ s.version = '0.11.2'
4
4
  s.summary = "CDDL generator and validator."
5
5
  s.description = %{A parser, generator, and validator for CDDL}
6
6
  s.add_dependency('cbor-diag')
data/lib/cddl.rb CHANGED
@@ -1048,6 +1048,12 @@ module CDDL
1048
1048
  end
1049
1049
  # warn ["ANNO", ok1, v1, vt1, ok2, v2, vt2, d].inspect
1050
1050
  [] if d == v1 + v2 # XXX Focus ArgumentError
1051
+ elsif conop == :plus && Integer === d
1052
+ if ok1 && vt1 == Integer
1053
+ validate1a(d - Integer(v1), control)
1054
+ elsif ok2 && vt2 == Integer
1055
+ validate1a(d - Integer(v2), target)
1056
+ end
1051
1057
  end
1052
1058
  elsif ann = validate1a(d, target)
1053
1059
  case conop
@@ -0,0 +1,3 @@
1
+ a = b<13..15>
2
+ b<T> = #7.<32 .plus T>
3
+ ; cddl dotplus1.cddl gp 10
@@ -0,0 +1,3 @@
1
+ a = d<17..19>
2
+ d<T> = #7.<T .plus 32>
3
+ ; cddl dotplus.cddl gp 10
@@ -0,0 +1,3 @@
1
+ a = d<17..19>
2
+ d<T> = 32.5 .plus T
3
+ ; cddl dotplus4.cddl gp 10
@@ -0,0 +1,3 @@
1
+ a = d<17..19>
2
+ d<T> = T .plus 32.5
3
+ ; cddl dotplus4.cddl gp 10
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
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-03-02 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cbor-diag
@@ -185,6 +185,10 @@ files:
185
185
  - test-data/decimal.cddl
186
186
  - test-data/decimal2.cddl
187
187
  - test-data/det1.cddl
188
+ - test-data/dotplus1.cddl
189
+ - test-data/dotplus2.cddl
190
+ - test-data/dotplus3.cddl
191
+ - test-data/dotplus4.cddl
188
192
  - test-data/dotsize.cddl
189
193
  - test-data/extractor-demo.cddl
190
194
  - test-data/feat1.cddl