parsanol 1.3.118 → 1.3.120
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/Cargo.lock +4 -4
- data/lib/parsanol/parg/bindings.rb +8 -0
- data/lib/parsanol/parg/document.rb +2 -2
- data/lib/parsanol/parg/parser.rb +8 -4
- data/lib/parsanol/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e61dcbc90916d0c5bc6d82ecfa1f4c1f76987df549b49460a20e01622bb0a159
|
|
4
|
+
data.tar.gz: 3a4214dcc35b10e44819910f78cc1905dce036c1789ab7162c8819f92ffc15a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9be0ac6018e475fbaba69dc3f95a0ca55567f8664049aaab3b7ffa20a5dafc7c2508da7d3aa66768010373a6b926426761e134ce39b490e0663b0394ea0ffb7
|
|
7
|
+
data.tar.gz: 0373d7ad8a5e0c5dad37702b59c22e12fd75646a2de59fbe1dbaa7d02dcd9a297b099c8a32759a3a048acf0c63e9d7b7a8f212a616e4f7c8caf41fa8be29776c
|
data/Cargo.lock
CHANGED
|
@@ -307,9 +307,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
307
307
|
|
|
308
308
|
[[package]]
|
|
309
309
|
name = "parsanol"
|
|
310
|
-
version = "0.19.
|
|
310
|
+
version = "0.19.17"
|
|
311
311
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
312
|
-
checksum = "
|
|
312
|
+
checksum = "761b572291fd7bad4514b55492cc402d297dd1586e48d1daad6ca25a927968b1"
|
|
313
313
|
dependencies = [
|
|
314
314
|
"ahash",
|
|
315
315
|
"getrandom 0.3.4",
|
|
@@ -326,9 +326,9 @@ dependencies = [
|
|
|
326
326
|
|
|
327
327
|
[[package]]
|
|
328
328
|
name = "parsanol-derive"
|
|
329
|
-
version = "0.19.
|
|
329
|
+
version = "0.19.17"
|
|
330
330
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
331
|
-
checksum = "
|
|
331
|
+
checksum = "3831668982431ef76e72800bd4cb399c38f0b51554541d4e4263a09fe461f460"
|
|
332
332
|
dependencies = [
|
|
333
333
|
"proc-macro2",
|
|
334
334
|
"quote",
|
|
@@ -74,6 +74,14 @@ module Parsanol
|
|
|
74
74
|
# any instance keep the legacy occurrence pairing.
|
|
75
75
|
instances = shape && group_instances(shape, prefix)
|
|
76
76
|
if instances
|
|
77
|
+
# The occurrence path's `return if count.zero?`: a repetition
|
|
78
|
+
# that fired zero iterations (the tree carries `parts: []`)
|
|
79
|
+
# binds no key — the recorded native expectations and the
|
|
80
|
+
# pubid builders rely on the absent reading (the empty-array
|
|
81
|
+
# binding regression, caught by the pubid corpus gate; see
|
|
82
|
+
# parsanol-rs#370).
|
|
83
|
+
return if instances.empty?
|
|
84
|
+
|
|
77
85
|
list = (out[prefix.to_sym] ||= [])
|
|
78
86
|
instances.each do |instance|
|
|
79
87
|
found = collect_captures(instance)
|
|
@@ -37,8 +37,8 @@ module Parsanol
|
|
|
37
37
|
@grammar_name = nil
|
|
38
38
|
# The default capture dialect is v1 (the owner's reversal,
|
|
39
39
|
# 2026-10-28): runtime compiles of unpinned sources keep the
|
|
40
|
-
# legacy shapes — the pubid fleet froze against them.
|
|
41
|
-
#
|
|
40
|
+
# legacy shapes — the pubid fleet froze against them. edition
|
|
41
|
+
# "v2" is the named-trees opt-in via the grammar header.
|
|
42
42
|
@edition = "v1"
|
|
43
43
|
@version = "0.0.0"
|
|
44
44
|
@source = nil
|
data/lib/parsanol/parg/parser.rb
CHANGED
|
@@ -261,12 +261,16 @@ module Parsanol
|
|
|
261
261
|
# the author declares, per grammar, which tree semantics the
|
|
262
262
|
# grammar means. THE DEFAULT IS 1 (the legacy shapes — the
|
|
263
263
|
# owner's 2026-10-28 reversal). 2 = fully named trees +
|
|
264
|
-
# explicit spans.
|
|
265
|
-
#
|
|
266
|
-
#
|
|
267
|
-
|
|
264
|
+
# explicit spans. The edition is canonicalized here —
|
|
265
|
+
# everything downstream only ever sees "v1"/"v2". The
|
|
266
|
+
# pre-1.3.113 `mode` alias was removed (the owner's
|
|
267
|
+
# 2026-10-31 ruling): the header fails with the fix named.
|
|
268
|
+
if peek&.type == :ident && peek.value == "edition"
|
|
268
269
|
advance
|
|
269
270
|
document.edition = edition_value
|
|
271
|
+
elsif peek&.type == :ident && peek.value == "mode"
|
|
272
|
+
raise ParseError,
|
|
273
|
+
'the grammar header keyword is edition; mode (the pre-1.3.113 alias) was removed — write edition "v1" or edition "v2"'
|
|
270
274
|
end
|
|
271
275
|
punct("{")
|
|
272
276
|
skip_newlines
|
data/lib/parsanol/version.rb
CHANGED