parsanol 1.3.106-arm-linux → 1.3.107-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: c8e81e7a4e5f9cfb77b762dac9edd7fc9d19fff164b5f29747f0dc40fc32fdff
4
- data.tar.gz: c5ad9c95e2f807c9eb7504f3ada5c68fc0f1845339127c9b93c10cbf9bc7ef36
3
+ metadata.gz: 82264b2e58bdcd642b09e1b7d39e5848685758e4be7b5d04c3d1ccbf8891e1f0
4
+ data.tar.gz: 4abb4bd1c4195f5efb724a23f14be6e24451c284f25748eec7e914129280d4a8
5
5
  SHA512:
6
- metadata.gz: 9b83655aec12cd04283649bb963b43d9f6a91d612c5d4eba78cba33cdf863a5f27ae5bafe55668869bee28ffe5aa398bb03fc098e408be544fa0a7ba006e1bf9
7
- data.tar.gz: 74f4bdf5966cf6b6050893c871f7ac1083633ebd564cdaf11cca71cfd50fa68e1826dd5c5cf12e9eccacdc3dd6a8c15efdb6c15cab55debdc464122aeee4698f
6
+ metadata.gz: 31541ed28f1e205cb5abcbb0d90f59dbd18ebc9734026f458a2458d8c1cdf97b6a17686c7dc1c9bf6f3fccc5342dde8d078561d403f32dadae225b11edef0171
7
+ data.tar.gz: 499beed8e7e159aaf36223cc318f4fea3f40f69456b3fb48c5ce1278bd592cf323470905d165dfb22777ca5e607cb96a17de16c039b56395185a42dfac8a1a08
@@ -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: 34462468 bytes
4
- sha256: 46eb40454419b8f581c175de62171e5f21ae1d1fceaff401dafdc8265a0ab279
3
+ size: 34490424 bytes
4
+ sha256: a3cdb4f287af7a777278dc7ef4db062d9c3aa6b30e6667ffb26542d25215dec2
@@ -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: 34647648 bytes
4
- sha256: 4ae03ce81d44772f92bb1ba6a934c2865cd8234b75679c6381f5d7bc303c4771
3
+ size: 34675616 bytes
4
+ sha256: 8ccc77dbd45591ffcd1cceabed8a2324593f3cdfbdd3acc463fbec81702381a8
@@ -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: 34641836 bytes
4
- sha256: 0aa076379dfc5c148fe26c73b366be54a223e4500d1e6c2301dec1c3eeabb0f2
3
+ size: 34669796 bytes
4
+ sha256: 5b8b78e7c01dca71d2abe00446475964e6bf894dacc0aadb427910ab80eebf38
@@ -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: 34651552 bytes
4
- sha256: 9d974658abb37332058f857218bb15de4a127871db172945f91b043bd3443aa2
3
+ size: 34679512 bytes
4
+ sha256: 05dea26c9937b15e9f7f9ad8800d4cb29fc365a056640cecea6ac992d03092a3
Binary file
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.106"
4
+ VERSION = "1.3.107"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.106
4
+ version: 1.3.107
5
5
  platform: arm-linux
6
6
  authors:
7
7
  - Ribose Inc.