parsanol 1.3.73-aarch64-linux → 1.3.74-aarch64-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 +4 -4
- data/lib/parsanol/3.2/parsanol_native.so +2 -2
- data/lib/parsanol/3.3/parsanol_native.so +2 -2
- data/lib/parsanol/3.4/parsanol_native.so +2 -2
- data/lib/parsanol/4.0/parsanol_native.so +2 -2
- data/lib/parsanol/atoms/trivia.rb +2 -0
- data/lib/parsanol/native/libparsanol.so +2 -2
- data/lib/parsanol/native/serializer.rb +19 -0
- data/lib/parsanol/native/transformer.rb +9 -1
- data/lib/parsanol/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6871a07ccdc7d11b0041ba03a51ba2e885b02bd51bb541c6a9357a6f1a3985cf
|
|
4
|
+
data.tar.gz: fa490a9e19c71d384117a8970fdcee890b7ed29ab621e3dc25dd3c91e9dfdbef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffaecdd316c082346d50f6922f2964f5035b5e691f45c8b78358a67453a2727a0fed57f867e72b3e49362168a4ce735b52c698d7636670189638cdb208b6f231
|
|
7
|
+
data.tar.gz: d59b9d586311d6369bed9e7a0917fe82da0a5a6f7c6c0972737c37c19d48f7554bb6a528e05bc321463497579bba61454dc2cc9af4af5c1c388d79f851f78308
|
|
@@ -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:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 39337992 bytes
|
|
4
|
+
sha256: 1d3f47e55e5e85ec6e03d4ad6316b58df9ed2bccc6ceceefe68c6dba361d1862
|
|
@@ -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:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 39573016 bytes
|
|
4
|
+
sha256: 841f735c6af7932ef9be51920576122661fc77698a66110fa2edce0991c6fba7
|
|
@@ -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:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 39572840 bytes
|
|
4
|
+
sha256: 9adf61798832651e9227c81e0baf484ee5182d9f71872ebe1571a44f815d9cb9
|
|
@@ -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:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 39582880 bytes
|
|
4
|
+
sha256: e6b8b12baa38cab06cc66e10ba17766bc4d84bc381cc3a795ac2cd957a5c58e1
|
|
@@ -29,6 +29,8 @@ module Parsanol
|
|
|
29
29
|
# compiler derives markers from each capturer rule's first Str
|
|
30
30
|
# atom, e.g. "//" => :line_comment); units not matching any
|
|
31
31
|
# marker are whitespace-shaped and stay unrecorded.
|
|
32
|
+
attr_reader :capturers
|
|
33
|
+
|
|
32
34
|
def initialize(atom, capturers)
|
|
33
35
|
super(atom)
|
|
34
36
|
@capturers = capturers
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: data/lib/parsanol/native/libparsanol.so
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 35196808 bytes
|
|
4
|
+
sha256: 51ad2e6620f065397d375b131453ff4c0517462d1374ea8c5d9f73e83dcc7fef
|
|
@@ -78,6 +78,15 @@ module Parsanol
|
|
|
78
78
|
serialize_custom_ref(atom)
|
|
79
79
|
when Parsanol::Atoms::Dynamic
|
|
80
80
|
serialize_dynamic(atom)
|
|
81
|
+
when Parsanol::Atoms::TriviaCapture
|
|
82
|
+
# parsanol-ruby#152: the capture wrapper carries
|
|
83
|
+
# its marker table so the native engine records
|
|
84
|
+
# comment-shaped units into the pending channel
|
|
85
|
+
# and attaches them to the next Named capture
|
|
86
|
+
# under `comments:`. A distinct variant keeps the
|
|
87
|
+
# declared gate: engines predating it reject
|
|
88
|
+
# capture-carrying artifacts loudly.
|
|
89
|
+
serialize_trivia_capture(atom)
|
|
81
90
|
when Parsanol::Atoms::Trivia
|
|
82
91
|
# Wire-distinct from Ignore (rs#172): the Rust
|
|
83
92
|
# engine suppresses trivia-position diagnostics by
|
|
@@ -283,6 +292,16 @@ module Parsanol
|
|
|
283
292
|
"parse this grammar with mode: :ruby"
|
|
284
293
|
end
|
|
285
294
|
|
|
295
|
+
def serialize_trivia_capture(atom)
|
|
296
|
+
inner_id = serialize_atom(atom.wrapped_atom)
|
|
297
|
+
{
|
|
298
|
+
"TriviaCapture" => {
|
|
299
|
+
"atom" => inner_id,
|
|
300
|
+
"rules" => atom.capturers.map { |marker, label| [marker, label.to_s] },
|
|
301
|
+
},
|
|
302
|
+
}
|
|
303
|
+
end
|
|
304
|
+
|
|
286
305
|
def serialize_trivia(atom)
|
|
287
306
|
inner_id = serialize_atom(atom.wrapped_atom)
|
|
288
307
|
{
|
|
@@ -298,9 +298,17 @@ module Parsanol
|
|
|
298
298
|
is_repetition = value.is_a?(Array) && !value.empty? &&
|
|
299
299
|
value.first.equal?(REPETITION_SYM)
|
|
300
300
|
|
|
301
|
+
# parsanol-ruby#152: `comments` lists are host-constructed
|
|
302
|
+
# trivia attachments, not parser repetitions — their unit
|
|
303
|
+
# hashes carry the trivia kind key, never the attachment
|
|
304
|
+
# key, so the re-keying below must not wrap them.
|
|
305
|
+
is_trivia_attachment = is_repetition && sym_key == :comments
|
|
306
|
+
|
|
301
307
|
transformed = transform(value, named: true)
|
|
302
308
|
|
|
303
|
-
result[sym_key] = if
|
|
309
|
+
result[sym_key] = if is_trivia_attachment
|
|
310
|
+
transformed
|
|
311
|
+
elsif is_repetition
|
|
304
312
|
if transformed.is_a?(Array)
|
|
305
313
|
if transformed.all? do |item|
|
|
306
314
|
item.is_a?(Hash) && item.key?(sym_key)
|
data/lib/parsanol/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.3.74
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-07 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
|