parsanol 1.3.106-aarch64-linux → 1.3.107-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/native/libparsanol.so +2 -2
- data/lib/parsanol/native.rb +44 -0
- data/lib/parsanol/parg/artifact.rb +12 -1
- 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: 4a248ea2b74e5e7a7be04c806fd97f180b76514e96281f5daaf04a99e9ca317e
|
|
4
|
+
data.tar.gz: bf7fe292aadabb0107f3353f6b0e96c0f6d2b0c1cc4006398590d0a34b7796c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef2edf2620ccaf4369731c83f9bdc5ae063898b0dcc5813dbbfa5a690e2e85b7f99e47dea01cca770198a9c406b1f5c147c540782b84e111d34d6e75be2757d3
|
|
7
|
+
data.tar.gz: 586b3121956c700428f7bedbc3218ece7a15c6aaaf79f49216ad3a724e4ee2a04e50934f36a57a055386f9342e141a1d8942fc464fbb0bf2d3f325ad6a6abc9d
|
|
@@ -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: 40743256 bytes
|
|
4
|
+
sha256: f27084008a8a2764ecb363b009685fd79d6b549460089afd8cffdeee1d286d83
|
|
@@ -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: 40978344 bytes
|
|
4
|
+
sha256: 9c09c91329de7f138e37a561a3f700520f37c39968d201c941bc58636cbf7b9b
|
|
@@ -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: 40973960 bytes
|
|
4
|
+
sha256: 967c4b42655705c1aa762e03499986fc185657ff4008297e093c73ecaa8cb60a
|
|
@@ -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: 40983992 bytes
|
|
4
|
+
sha256: 5de5e2e7a682e336ae7f34c7d3967341320c85b4fc969e41354ed46498b892bb
|
|
@@ -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: 36501808 bytes
|
|
4
|
+
sha256: aba1f5e1e7283015e5650abd249c27d9f0e095747a3bd1921aa981a1d9c64a10
|
data/lib/parsanol/native.rb
CHANGED
|
@@ -29,6 +29,16 @@ module Parsanol
|
|
|
29
29
|
Parser.available?
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
# Whether the reference walker is available (TODO.sota/8 B1): the
|
|
33
|
+
# `_parse_handle_reference` export ships with parsanol >= 0.18.18.
|
|
34
|
+
# Probed rather than assumed so a checkout whose extension predates
|
|
35
|
+
# the export can report the missing fifth fuzz path instead of
|
|
36
|
+
# raising NoMethodError mid-run.
|
|
37
|
+
def reference_available?
|
|
38
|
+
available? && Parser.extension_loaded? &&
|
|
39
|
+
respond_to?(:_parse_handle_reference)
|
|
40
|
+
end
|
|
41
|
+
|
|
32
42
|
# Parse input with a Ruby grammar, returning clean AST with lazy line/column.
|
|
33
43
|
#
|
|
34
44
|
# Uses batch FFI format for maximum performance (3-5x faster than object-by-object).
|
|
@@ -355,6 +365,40 @@ module Parsanol
|
|
|
355
365
|
raise_native_parse_error(e, grammar, input)
|
|
356
366
|
end
|
|
357
367
|
end
|
|
368
|
+
|
|
369
|
+
# Reference-walker path (TODO.sota/8 B1): the plain recursive
|
|
370
|
+
# relation — no VM, no memo tables, no fused scans, no terminal
|
|
371
|
+
# fast paths. Deliberately slow; the cross-engine differential
|
|
372
|
+
# fuzz runs it as an independent path, so a native failure here is
|
|
373
|
+
# a real disagreement and must not be rescued into a different
|
|
374
|
+
# engine's answer.
|
|
375
|
+
def parse_reference(grammar, input)
|
|
376
|
+
unless reference_available?
|
|
377
|
+
raise NotImplementedError,
|
|
378
|
+
"reference mode requires the native extension with " \
|
|
379
|
+
"parsanol >= 0.18.18"
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
handle = Parser.grammar_handle(grammar)
|
|
383
|
+
|
|
384
|
+
begin
|
|
385
|
+
BatchDecoder.decode_and_flatten(_parse_handle_reference(handle, input),
|
|
386
|
+
input, Parsanol::Slice)
|
|
387
|
+
rescue ArgumentError
|
|
388
|
+
# Handle dropped Rust-side (e.g. cache cleared): re-register once.
|
|
389
|
+
Parser.invalidate_handle(handle)
|
|
390
|
+
begin
|
|
391
|
+
BatchDecoder.decode_and_flatten(
|
|
392
|
+
_parse_handle_reference(Parser.grammar_handle(grammar), input),
|
|
393
|
+
input, Parsanol::Slice
|
|
394
|
+
)
|
|
395
|
+
rescue RuntimeError => e
|
|
396
|
+
raise_native_parse_error(e, grammar, input)
|
|
397
|
+
end
|
|
398
|
+
rescue RuntimeError => e
|
|
399
|
+
raise_native_parse_error(e, grammar, input)
|
|
400
|
+
end
|
|
401
|
+
end
|
|
358
402
|
end
|
|
359
403
|
end
|
|
360
404
|
end
|
|
@@ -108,13 +108,24 @@ module Parsanol
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
root_atom(entry_name).parse(input)
|
|
111
|
+
when :reference
|
|
112
|
+
# The plain recursive relation (TODO.sota/8 B1): same shaping
|
|
113
|
+
# pipeline, no VM, no memo tables, no fused scans. Never falls
|
|
114
|
+
# back to :ruby — a reference result produced by another
|
|
115
|
+
# engine would defeat the differential. Deliberately slow.
|
|
116
|
+
unless Native.reference_available?
|
|
117
|
+
raise NotImplementedError, "reference mode requires the native " \
|
|
118
|
+
"extension with parsanol >= 0.18.18"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
Native.parse_reference(root_atom(entry_name), input)
|
|
111
122
|
when :ruby
|
|
112
123
|
# Deepest-failure reporting parity with the native engine: the
|
|
113
124
|
# default Tree reporter keeps the most recent (root) failure,
|
|
114
125
|
# which reports position 1:1 for grammars with entry wrappers.
|
|
115
126
|
root_atom(entry_name).parse(input, reporter: ErrorReporter::Deepest.new)
|
|
116
127
|
else
|
|
117
|
-
raise ArgumentError, "unknown mode #{mode.inspect} (use :native or :ruby)"
|
|
128
|
+
raise ArgumentError, "unknown mode #{mode.inspect} (use :native, :reference or :ruby)"
|
|
118
129
|
end
|
|
119
130
|
end
|
|
120
131
|
|
data/lib/parsanol/version.rb
CHANGED