parsanol 1.3.125-arm-linux → 1.3.127-arm-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b431718d36a748f287ef929180c393b7d2cbbfc965754cafc3a4fe02af1c1dc
4
- data.tar.gz: a6884381bb888195a61e10e81123c4343d48e81f8aba104bb5a120e4a9a48b8c
3
+ metadata.gz: 5101db070cd884f1f589f7c8b8d338a50231abc1a10095fede11993d1d5c4cc3
4
+ data.tar.gz: 22226c62d53e1a291f0ee0ca0d4499b56d6fc82848171c85bb7d947e69e1ada7
5
5
  SHA512:
6
- metadata.gz: 3a8c73c828ff66ee6099a6915e0e395fb333b8612b47466994de21252b07016e2b3d0cd4c713cd5fa180257c05931f456fb726b1e08f7b12d4a69ab5a66813d5
7
- data.tar.gz: cc2fa69ec81533fb3ff16b9af1337e4166f2f1d1c38fbdc3f2e19fe76ae91d0df15b7d32676d1fad68eaa03d81d0f0029f6c893cd6dd09fae835251823c69a6f
6
+ metadata.gz: 131b1ee7c45c3d7103150a4fc99e22f3e3fefcb63672fa3a38151d36a16fb57f7ec7af617b17a7f5089471b8fbc24d39c1a70f9ed3846e727159aa598e413f02
7
+ data.tar.gz: 8ea0a3732614b334bc6729d4c1c6bb84c66fdb46ca01b020a8d73db7c8b55b989851ae0e17ce15b1cba50314365d93dbf4553178ddd7f0abb10971036b780c3b
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/lib/parsanol/3.2/parsanol_native.so
3
- size: 39740052 bytes
4
- sha256: b70dc2b64af8f8c052309c13ef755d8a156697af55b2017eec94d1ad43eef2f2
3
+ size: 39740032 bytes
4
+ sha256: c8d53988b1b0272b424a9e999eb14410a7d8633b97a12fc7a290fbe49e8b3182
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/lib/parsanol/3.3/parsanol_native.so
3
- size: 39925296 bytes
4
- sha256: 3d60d5cad8c1bf5f3ae6463c82d31f8a1027a779dc4c35be5004997d2557c862
3
+ size: 39925276 bytes
4
+ sha256: 9583103439fe4fd1c54990622ca380e01cb864dc11d4946fccd72823f344d7b0
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/lib/parsanol/3.4/parsanol_native.so
3
- size: 39919396 bytes
4
- sha256: ccea4473a43405abe096c873c2c695ba93c271245db30d1b77f04b27df7b47a3
3
+ size: 39919376 bytes
4
+ sha256: 840045138064b78a947c1e1675c57921c963a7df7cd055407572969d99a28518
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/lib/parsanol/4.0/parsanol_native.so
3
- size: 39929152 bytes
4
- sha256: 4d612343474dca5ded544fa60a9fc23bbc28d7a935ccec5546db3cbd62676540
3
+ size: 39929132 bytes
4
+ sha256: 7c81415e962f42359724f8b8abd2d7f884f2a783faacb3857c61966e085530d3
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/lib/parsanol/native/libparsanol.so
3
- size: 36060976 bytes
4
- sha256: 2ee2499abdc8e1b8707658bddd5a8a861961057ff0d5276849b33ec2f1e67f31
3
+ size: 36061184 bytes
4
+ sha256: 9236ba74fe40e51df4ac355f6b1c5d8ac61ba516a58351d77dfda024c2ac62b8
@@ -36,10 +36,24 @@ module Parsanol
36
36
  # bound map (parsanol-ruby#413): a capture present in the parse
37
37
  # but bound nowhere is silent data loss, the one case the
38
38
  # binding layer's other checks miss. Absence in the TREE is
39
- # legitimate optionality and never raises.
39
+ # legitimate optionality and never raises. Coverage is checked
40
+ # against every hash key anywhere in the bound map, not just the
41
+ # binding's own leaf: a `(raw)` binding carries its entire
42
+ # subtree, so captures nested inside a raw-bound ancestor are
43
+ # delivered through it (parsanol-ruby#427 — BS 9113 bundled_list).
44
+ bound_keys = {}
45
+ walk_keys = lambda do |node|
46
+ case node
47
+ when Hash
48
+ node.each_key { |key| bound_keys[key.to_sym] = true }
49
+ node.each_value { |value| walk_keys.call(value) }
50
+ when Array then node.each(&walk_keys)
51
+ end
52
+ end
53
+ walk_keys.call(out)
40
54
  lost = bindings.select do |binding|
41
55
  capture = binding["capture"].to_sym
42
- present.include?(capture) && !bound?(out, binding)
56
+ present.include?(capture) && !bound_keys.key?(capture)
43
57
  end
44
58
  unless lost.empty?
45
59
  raise BindError,
@@ -49,21 +63,6 @@ module Parsanol
49
63
  out
50
64
  end
51
65
 
52
- # Did this binding contribute anything to the bound map? Scalars
53
- # bind under their leaf key; array groups bind under their prefix.
54
- def bound?(out, binding)
55
- path = binding["path"].to_s
56
- if path.include?("[]")
57
- prefix = path.split("[]").first.to_sym
58
- rows = out[prefix]
59
- rows.is_a?(Array) && rows.any? do |row|
60
- row.is_a?(Hash) && row.key?(leaf_key(binding))
61
- end
62
- else
63
- out.key?(leaf_key(binding))
64
- end
65
- end
66
-
67
66
  # Canonical test-value form: one equality surface for capture and
68
67
  # example expectations on both sides of the comparison (Slice vs
69
68
  # source literal was comparing heterogeneous types). Terminals
@@ -632,8 +632,8 @@ module Parsanol
632
632
  markers[literal] = node.a.to_sym if literal && !literal.strip.empty?
633
633
  collect.call(@document.rules[node.a]) if @document.rules.key?(node.a)
634
634
  when :alt, :seq then node.a.each { |b| collect.call(b) }
635
- when :rep, :opt, :cap then collect.call(node.a)
636
- when :pred then collect.call(node.b)
635
+ when :rep, :opt then collect.call(node.a)
636
+ when :cap, :pred then collect.call(node.b)
637
637
  end
638
638
  end
639
639
  collect.call(@document.skip_declaration)
@@ -652,7 +652,11 @@ module Parsanol
652
652
  case n.kind
653
653
  when :lit then literal = n.a
654
654
  when :seq, :alt then n.a.each { |c| walk.call(c) unless literal }
655
- when :rep, :opt, :cap, :pred then walk.call(n.a || n.b) unless literal
655
+ # :cap stores the capture NAME in `a` (a plain String) and the
656
+ # captured node in `b`; :pred stores its flag in `a`. Walking
657
+ # `a` on either crashes — descend through `b`.
658
+ when :rep, :opt then walk.call(n.a) unless literal
659
+ when :cap, :pred then walk.call(n.b) unless literal
656
660
  end
657
661
  end
658
662
  walk.call(node)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.125"
4
+ VERSION = "1.3.127"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.125
4
+ version: 1.3.127
5
5
  platform: arm-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-02 00:00:00.000000000 Z
11
+ date: 2026-11-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A small Ruby library for constructing parsers in the PEG (Parsing Expression
14
14
  Grammar) fashion. Parsanol provides Parslet-compatible API with additional features