parsanol 1.3.77-aarch64-linux → 1.3.79-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/dynamic.rb +26 -5
- data/lib/parsanol/native/libparsanol.so +2 -2
- data/lib/parsanol/native/parser.rb +7 -0
- data/lib/parsanol/parg/artifact.rb +9 -1
- data/lib/parsanol/version.rb +1 -1
- data/lib/parsanol/vm.rb +4 -0
- 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: 4e9d6f048282d103bf86ad942a6a4ab886cdd63e24256fda93f318bf3b49a6af
|
|
4
|
+
data.tar.gz: 4fcce5f528a27ab4463064887177e5bbe81f71d75ed2a4740824cdc3ab93224a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85f8051f8ad4c6b7065f3fb88ed2ed482a56517860f59c0938086b2da5859d136b2352149288c1f1a469ef5976f0279999b4e5073e31d67ba0e5f828988ea3d0
|
|
7
|
+
data.tar.gz: b24dab2ec2f2146e79bab3cfc56e5d31dadf04980f2c29c9cfa7d9051009e69f699b81c587898e0c5723c63ff444c17c31b518ca427136da2e539aafd54311ac
|
|
@@ -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: 39970840 bytes
|
|
4
|
+
sha256: 2418549f6fab93c79e9ccac4bb541d78fe848f4bc77541d5fd950ec36d403dc8
|
|
@@ -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: 40205952 bytes
|
|
4
|
+
sha256: 05caedfe18731bfcbb62ab895baab23913aeb41b54547b381fd119b68a213ac2
|
|
@@ -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: 40213984 bytes
|
|
4
|
+
sha256: de34a1df947d7a29c0b6ef3a81fde12dd7606b3b1a6a21c09ba7cdb16ae5db16
|
|
@@ -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: 40223960 bytes
|
|
4
|
+
sha256: 34f828a479cf2e1c719c23756c285456cef7560a81fa9ecec22190064156e2e6
|
|
@@ -132,6 +132,12 @@ module Parsanol
|
|
|
132
132
|
#
|
|
133
133
|
def invoke_from_rust(callback_id, context)
|
|
134
134
|
block = @mutex.synchronize { @callbacks[callback_id]&.dig(:block) }
|
|
135
|
+
if ENV["PARSANOL_INVOKE_TRACE"]
|
|
136
|
+
cont = context[:captures][:cont]
|
|
137
|
+
warn "INVOKE id=#{callback_id} pos=#{context[:pos]} " \
|
|
138
|
+
"block=#{context[:captures][:block].inspect} " \
|
|
139
|
+
"cont=#{cont.class}@#{cont.object_id}"
|
|
140
|
+
end
|
|
135
141
|
return nil unless block
|
|
136
142
|
|
|
137
143
|
# Build DynamicContext from hash
|
|
@@ -142,18 +148,33 @@ module Parsanol
|
|
|
142
148
|
)
|
|
143
149
|
|
|
144
150
|
# Call the block. Parslet-canonical blocks take two arguments
|
|
145
|
-
# (source, context)
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
151
|
+
# (source, context). The source is a REAL Parsanol::Source
|
|
152
|
+
# positioned at the dispatch point: blocks that read source
|
|
153
|
+
# state (bytepos, line_and_column — the lazy-continuation
|
|
154
|
+
# guards do) previously got the context wrapper for both
|
|
155
|
+
# args and raised NoMethodError, which the bridge turned
|
|
156
|
+
# into a silent dispatch failure (rs#165). Consumption
|
|
157
|
+
# side-effects stay local to the call: the resolved fragment
|
|
158
|
+
# is the parse.
|
|
149
159
|
result = if block.arity == 2
|
|
150
|
-
|
|
160
|
+
dispatch_source = Parsanol::Source.new(context[:input])
|
|
161
|
+
dispatch_source.bytepos = context[:pos]
|
|
162
|
+
block.call(dispatch_source, ctx)
|
|
151
163
|
else
|
|
152
164
|
block.call(ctx)
|
|
153
165
|
end
|
|
154
166
|
|
|
155
167
|
return nil unless result
|
|
156
168
|
|
|
169
|
+
if ENV["PARSANOL_FRAG_TRACE"]
|
|
170
|
+
begin
|
|
171
|
+
json = result.to_atom_json
|
|
172
|
+
warn "FRAG id=#{callback_id} json=#{json[0, 120]}"
|
|
173
|
+
rescue StandardError => e
|
|
174
|
+
warn "FRAG id=#{callback_id} RAISE #{e.class}: #{e.message[0, 140]}"
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
157
178
|
# Capture-write contract (GH-80): return the atom and the
|
|
158
179
|
# post-call captures hash; the Rust bridge diffs it against
|
|
159
180
|
# the seeded values and propagates the block's writes
|
|
@@ -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: 35764456 bytes
|
|
4
|
+
sha256: ff8bc8908504b2a1e70764ecab02dfdf252314b213bdcb7daa728e3902b4068e
|
|
@@ -121,6 +121,13 @@ module Parsanol
|
|
|
121
121
|
}
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
# Public (rs#166): the VM program cache shares compiled
|
|
125
|
+
# programs across fresh parser instances keyed on this —
|
|
126
|
+
# the same disambiguator the grammar cache uses.
|
|
127
|
+
def public_structure_hash(atom)
|
|
128
|
+
grammar_structure_hash(atom)
|
|
129
|
+
end
|
|
130
|
+
|
|
124
131
|
private
|
|
125
132
|
|
|
126
133
|
def grammar_cache_key(root_atom)
|
|
@@ -74,7 +74,15 @@ module Parsanol
|
|
|
74
74
|
# grammar JSON and re-registered it per parse (~8x).
|
|
75
75
|
# Dynamic artifacts carry ruby-tier atoms their wire
|
|
76
76
|
# cannot express — they keep the interpreter.
|
|
77
|
-
|
|
77
|
+
begin
|
|
78
|
+
return root_atom(entry_name).parse(input, mode: :native)
|
|
79
|
+
rescue Parsanol::ParseFailed
|
|
80
|
+
# The atom-tree native path reports the root position; the
|
|
81
|
+
# wire-registration path carries the deepest-failure
|
|
82
|
+
# diagnostics (parsanol-ruby#171). Failures pay the
|
|
83
|
+
# serialization once; successes keep the fast lane.
|
|
84
|
+
return Native.parse(JSON.generate(entry(entry_name).fetch("grammar")), input)
|
|
85
|
+
end
|
|
78
86
|
end
|
|
79
87
|
|
|
80
88
|
root_atom(entry_name).parse(input)
|
data/lib/parsanol/version.rb
CHANGED
data/lib/parsanol/vm.rb
CHANGED
|
@@ -202,6 +202,10 @@ module Parsanol
|
|
|
202
202
|
# starts memoized on its very first parse (fresh parser instances
|
|
203
203
|
# included — the seed is recomputed at every compile), so the
|
|
204
204
|
# cold-start never pays the doomed unmemoized exploration.
|
|
205
|
+
# rs#166: proneness rides the structure-hash share as a bool —
|
|
206
|
+
# a later identical-structure grammar inherits the seed instead
|
|
207
|
+
# of running its cold start unmemoized because compilation was
|
|
208
|
+
# skipped entirely.
|
|
205
209
|
if compiler.backtracking_prone
|
|
206
210
|
(@heavy ||= {}.compare_by_identity)[root] = true
|
|
207
211
|
trim_cache(@heavy)
|