edn-abnf 0.5.30 → 0.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/edn-abnf +5 -4
- data/edn-abnf.gemspec +1 -1
- data/lib/cbor-diagnostic-app/zzz.rb +13 -0
- data/lib/parser/edngrammar.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 526056ed796bf81ffc83f6042d90706a446955e4069c10382f253e68b29fe587
|
|
4
|
+
data.tar.gz: 9f0221ad1617fcdf26411960ded59fb620a7a3a66175d15547a3b24f4e24885a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdf3bda3807bbf83935287d370927b2c10d02b667a72468b620ad7745e7ecdbca275a519b574133f5107cfd4fbe17d4b9bdcb81acc59df61e082d40c0e6c91e9
|
|
7
|
+
data.tar.gz: f7a0085dc92fe04f4b11e6872b518ff6bc7382813195cbf7d929fcf7281152c388c3790f09d57c71a2971e6fae5b0b4b28448474fbabea55e656c715cbcde045
|
data/bin/edn-abnf
CHANGED
|
@@ -115,11 +115,12 @@ if $options.lines
|
|
|
115
115
|
exit 1
|
|
116
116
|
end
|
|
117
117
|
CSV.parse(edn_file) do |ok, ednin, out|
|
|
118
|
-
if ok[0] == "#"
|
|
118
|
+
if !ok || ok[0] == "#" || ok == "op"
|
|
119
119
|
puts "# #{ok}, #{ednin.inspect}, #{out}" if $options.verbose
|
|
120
120
|
next
|
|
121
121
|
end
|
|
122
122
|
if ok[0] == "x"
|
|
123
|
+
warn "#{[ok, ednin, out].inspect}" unless ednin
|
|
123
124
|
result = tree_from_edn_possibly_hex(ednin)
|
|
124
125
|
result_hex = result.to_cbor.hexi
|
|
125
126
|
result_diag = result.cbor_diagnostic
|
|
@@ -136,8 +137,8 @@ if $options.lines
|
|
|
136
137
|
end
|
|
137
138
|
begin
|
|
138
139
|
ok = ok == "="
|
|
139
|
-
puts "➔ #{ok}, #{ednin}, #{out}" if $options.verbose
|
|
140
|
-
result = tree_from_edn_possibly_hex(ednin)
|
|
140
|
+
puts "➔ #{ok.inspect}, #{ednin.inspect}, #{out.inspect}" if $options.verbose
|
|
141
|
+
result = tree_from_edn_possibly_hex(ednin || "")
|
|
141
142
|
diag = result.cbor_diagnostic
|
|
142
143
|
if out == diag && !ok
|
|
143
144
|
puts "** ≠ / #{diag.inspect} / #{out.inspect}"
|
|
@@ -151,7 +152,7 @@ if $options.lines
|
|
|
151
152
|
end
|
|
152
153
|
puts "reparsed / #{diag.inspect} / #{out.inspect}" if $options.verbose
|
|
153
154
|
end
|
|
154
|
-
rescue ArgumentError => e
|
|
155
|
+
rescue CBOR_DIAG::AppParseError, ArgumentError => e
|
|
155
156
|
if ok
|
|
156
157
|
puts "** #{e} / #{result.inspect} / #{out.inspect}"
|
|
157
158
|
$error += 1
|
data/edn-abnf.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "edn-abnf"
|
|
3
|
-
s.version = "0.5.
|
|
3
|
+
s.version = "0.5.32"
|
|
4
4
|
s.summary = "CBOR Extended Diagnostic Notation (EDN) implemented in ABNF"
|
|
5
5
|
s.description = %q{edn-abnf implements converters and miscellaneous tools for CBOR EDN's ABNF}
|
|
6
6
|
s.author = "Carsten Bormann"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require "cbor-diagnostic-app/0"
|
|
2
|
+
|
|
3
|
+
class CBOR_DIAG::App_zzz
|
|
4
|
+
def self.decode(app_prefix, s)
|
|
5
|
+
CBOR::Tagged.new(999, [app_prefix, s])
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class CBOR_DIAG::App_yyy
|
|
10
|
+
def self.decode(app_prefix, s)
|
|
11
|
+
CBOR::Tagged.new(999, [app_prefix, s])
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/parser/edngrammar.rb
CHANGED
|
@@ -356,7 +356,7 @@ module EDNGRAMMAR
|
|
|
356
356
|
join1(s)
|
|
357
357
|
else
|
|
358
358
|
unless c == CBOR::Tagged && s.first.tag == 888 && s.first.value == nil # XXX check all values?
|
|
359
|
-
raise "*** unjoinable chunks #{c.inspect} #{s.inspect}" if s.size != 1
|
|
359
|
+
raise ArgumentError, "*** unjoinable chunks #{c.inspect} #{s.inspect}" if s.size != 1
|
|
360
360
|
end
|
|
361
361
|
s.first
|
|
362
362
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: edn-abnf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.32
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carsten Bormann
|
|
@@ -112,6 +112,7 @@ files:
|
|
|
112
112
|
- lib/cbor-diagnostic-app/hgrammar.rb
|
|
113
113
|
- lib/cbor-diagnostic-app/ip.rb
|
|
114
114
|
- lib/cbor-diagnostic-app/ipgrammar.rb
|
|
115
|
+
- lib/cbor-diagnostic-app/zzz.rb
|
|
115
116
|
- lib/edn-abnf.rb
|
|
116
117
|
- lib/parser/edn-util.rb
|
|
117
118
|
- lib/parser/edngrammar.rb
|