parsanol 1.3.34-x64-mingw32

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.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/Cargo.lock +574 -0
  3. data/Cargo.toml +18 -0
  4. data/HISTORY.txt +98 -0
  5. data/LICENSE +23 -0
  6. data/README.adoc +923 -0
  7. data/Rakefile +141 -0
  8. data/lib/parsanol/ast_visitor.rb +122 -0
  9. data/lib/parsanol/atoms/alternative.rb +123 -0
  10. data/lib/parsanol/atoms/base.rb +230 -0
  11. data/lib/parsanol/atoms/can_flatten.rb +244 -0
  12. data/lib/parsanol/atoms/capture.rb +38 -0
  13. data/lib/parsanol/atoms/context.rb +357 -0
  14. data/lib/parsanol/atoms/context_optimized.rb +38 -0
  15. data/lib/parsanol/atoms/custom.rb +110 -0
  16. data/lib/parsanol/atoms/cut.rb +66 -0
  17. data/lib/parsanol/atoms/dsl.rb +96 -0
  18. data/lib/parsanol/atoms/dynamic.rb +39 -0
  19. data/lib/parsanol/atoms/entity.rb +75 -0
  20. data/lib/parsanol/atoms/ignored.rb +37 -0
  21. data/lib/parsanol/atoms/infix.rb +167 -0
  22. data/lib/parsanol/atoms/lookahead.rb +85 -0
  23. data/lib/parsanol/atoms/named.rb +74 -0
  24. data/lib/parsanol/atoms/re.rb +83 -0
  25. data/lib/parsanol/atoms/repetition.rb +274 -0
  26. data/lib/parsanol/atoms/scope.rb +35 -0
  27. data/lib/parsanol/atoms/sequence.rb +186 -0
  28. data/lib/parsanol/atoms/str.rb +109 -0
  29. data/lib/parsanol/atoms/visitor.rb +91 -0
  30. data/lib/parsanol/atoms.rb +46 -0
  31. data/lib/parsanol/buffer.rb +133 -0
  32. data/lib/parsanol/builder_callbacks.rb +353 -0
  33. data/lib/parsanol/cause.rb +122 -0
  34. data/lib/parsanol/context.rb +39 -0
  35. data/lib/parsanol/convenience.rb +36 -0
  36. data/lib/parsanol/edit_tracker.rb +111 -0
  37. data/lib/parsanol/error_reporter/contextual.rb +99 -0
  38. data/lib/parsanol/error_reporter/deepest.rb +120 -0
  39. data/lib/parsanol/error_reporter/tree.rb +63 -0
  40. data/lib/parsanol/error_reporter.rb +100 -0
  41. data/lib/parsanol/expression/treetop.rb +154 -0
  42. data/lib/parsanol/expression.rb +106 -0
  43. data/lib/parsanol/fast_mode.rb +187 -0
  44. data/lib/parsanol/first_set.rb +79 -0
  45. data/lib/parsanol/grammar_builder.rb +179 -0
  46. data/lib/parsanol/incremental_parser.rb +182 -0
  47. data/lib/parsanol/interval_tree.rb +226 -0
  48. data/lib/parsanol/lazy_result.rb +179 -0
  49. data/lib/parsanol/mermaid.rb +142 -0
  50. data/lib/parsanol/native/batch_decoder.rb +255 -0
  51. data/lib/parsanol/native/dynamic.rb +239 -0
  52. data/lib/parsanol/native/ffi.rb +132 -0
  53. data/lib/parsanol/native/parser.rb +137 -0
  54. data/lib/parsanol/native/serializer.rb +262 -0
  55. data/lib/parsanol/native/transformer.rb +606 -0
  56. data/lib/parsanol/native/types.rb +29 -0
  57. data/lib/parsanol/native.rb +306 -0
  58. data/lib/parsanol/optimizer.rb +85 -0
  59. data/lib/parsanol/optimizers/choice_optimizer.rb +78 -0
  60. data/lib/parsanol/optimizers/cut_inserter.rb +182 -0
  61. data/lib/parsanol/optimizers/lookahead_optimizer.rb +56 -0
  62. data/lib/parsanol/optimizers/quantifier_optimizer.rb +60 -0
  63. data/lib/parsanol/optimizers/sequence_optimizer.rb +97 -0
  64. data/lib/parsanol/options/zero_copy.rb +127 -0
  65. data/lib/parsanol/options.rb +21 -0
  66. data/lib/parsanol/parallel.rb +128 -0
  67. data/lib/parsanol/parser.rb +279 -0
  68. data/lib/parsanol/parslet.rb +151 -0
  69. data/lib/parsanol/pattern/binding.rb +91 -0
  70. data/lib/parsanol/pattern.rb +162 -0
  71. data/lib/parsanol/pool.rb +219 -0
  72. data/lib/parsanol/pools/array_pool.rb +75 -0
  73. data/lib/parsanol/pools/buffer_pool.rb +182 -0
  74. data/lib/parsanol/pools/position_pool.rb +92 -0
  75. data/lib/parsanol/pools/slice_pool.rb +64 -0
  76. data/lib/parsanol/position.rb +94 -0
  77. data/lib/parsanol/resettable.rb +29 -0
  78. data/lib/parsanol/result.rb +46 -0
  79. data/lib/parsanol/result_builder.rb +208 -0
  80. data/lib/parsanol/result_stream.rb +266 -0
  81. data/lib/parsanol/rig/rspec.rb +71 -0
  82. data/lib/parsanol/rope.rb +81 -0
  83. data/lib/parsanol/scope.rb +104 -0
  84. data/lib/parsanol/slice.rb +160 -0
  85. data/lib/parsanol/source/line_cache.rb +102 -0
  86. data/lib/parsanol/source.rb +185 -0
  87. data/lib/parsanol/source_location.rb +167 -0
  88. data/lib/parsanol/streaming_parser.rb +124 -0
  89. data/lib/parsanol/string_view.rb +198 -0
  90. data/lib/parsanol/transform.rb +226 -0
  91. data/lib/parsanol/version.rb +5 -0
  92. data/lib/parsanol/vm.rb +1315 -0
  93. data/lib/parsanol/wasm/README.md +80 -0
  94. data/lib/parsanol/wasm/package.json +51 -0
  95. data/lib/parsanol/wasm/parsanol.js +252 -0
  96. data/lib/parsanol/wasm/parslet.d.ts +129 -0
  97. data/lib/parsanol/wasm_parser.rb +240 -0
  98. data/lib/parsanol.rb +329 -0
  99. data/parsanol.gemspec +49 -0
  100. metadata +161 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3aae82805bb43357592dafbda8fcb3fc3639f90ad7219d7edbdbffcecfc90202
4
+ data.tar.gz: 2601a5c5d9b2e260975d8c7e259c7aba888dea85d9b670b3a3eac7e6803fa468
5
+ SHA512:
6
+ metadata.gz: bb0c8f804ac9442e050b50f92930f48676729f2df336b0140165da311394859752d3c6b189c78386db3864cc6e9efa2a6c9ab2049d8c3ad6961b17d6390b300a
7
+ data.tar.gz: 6febec94672981f43bea085849a60fa65bec635b201fa3a89432f00f173c320143f9e8d87a3c9d35e107694a76390a62c60b266f9bb1604171dc3184a03507a5
data/Cargo.lock ADDED
@@ -0,0 +1,574 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "ahash"
7
+ version = "0.8.12"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
10
+ dependencies = [
11
+ "cfg-if",
12
+ "getrandom 0.3.4",
13
+ "once_cell",
14
+ "version_check",
15
+ "zerocopy",
16
+ ]
17
+
18
+ [[package]]
19
+ name = "aho-corasick"
20
+ version = "1.1.5"
21
+ source = "registry+https://github.com/rust-lang/crates.io-index"
22
+ checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
23
+ dependencies = [
24
+ "memchr",
25
+ ]
26
+
27
+ [[package]]
28
+ name = "allocator-api2"
29
+ version = "0.2.21"
30
+ source = "registry+https://github.com/rust-lang/crates.io-index"
31
+ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
32
+
33
+ [[package]]
34
+ name = "bindgen"
35
+ version = "0.72.1"
36
+ source = "registry+https://github.com/rust-lang/crates.io-index"
37
+ checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
38
+ dependencies = [
39
+ "bitflags",
40
+ "cexpr",
41
+ "clang-sys",
42
+ "itertools",
43
+ "proc-macro2",
44
+ "quote",
45
+ "regex",
46
+ "rustc-hash",
47
+ "shlex",
48
+ "syn 2.0.119",
49
+ ]
50
+
51
+ [[package]]
52
+ name = "bitflags"
53
+ version = "2.13.2"
54
+ source = "registry+https://github.com/rust-lang/crates.io-index"
55
+ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
56
+
57
+ [[package]]
58
+ name = "bumpalo"
59
+ version = "3.20.3"
60
+ source = "registry+https://github.com/rust-lang/crates.io-index"
61
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
62
+
63
+ [[package]]
64
+ name = "cexpr"
65
+ version = "0.6.0"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
68
+ dependencies = [
69
+ "nom",
70
+ ]
71
+
72
+ [[package]]
73
+ name = "cfg-if"
74
+ version = "1.0.4"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
77
+
78
+ [[package]]
79
+ name = "clang-sys"
80
+ version = "1.9.1"
81
+ source = "registry+https://github.com/rust-lang/crates.io-index"
82
+ checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a"
83
+ dependencies = [
84
+ "glob",
85
+ "libc",
86
+ "libloading",
87
+ ]
88
+
89
+ [[package]]
90
+ name = "either"
91
+ version = "1.18.0"
92
+ source = "registry+https://github.com/rust-lang/crates.io-index"
93
+ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
94
+
95
+ [[package]]
96
+ name = "equivalent"
97
+ version = "1.0.2"
98
+ source = "registry+https://github.com/rust-lang/crates.io-index"
99
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
100
+
101
+ [[package]]
102
+ name = "foldhash"
103
+ version = "0.2.0"
104
+ source = "registry+https://github.com/rust-lang/crates.io-index"
105
+ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
106
+
107
+ [[package]]
108
+ name = "getrandom"
109
+ version = "0.3.4"
110
+ source = "registry+https://github.com/rust-lang/crates.io-index"
111
+ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
112
+ dependencies = [
113
+ "cfg-if",
114
+ "js-sys",
115
+ "libc",
116
+ "r-efi 5.3.0",
117
+ "wasip2",
118
+ "wasm-bindgen",
119
+ ]
120
+
121
+ [[package]]
122
+ name = "getrandom"
123
+ version = "0.4.3"
124
+ source = "registry+https://github.com/rust-lang/crates.io-index"
125
+ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
126
+ dependencies = [
127
+ "cfg-if",
128
+ "js-sys",
129
+ "libc",
130
+ "r-efi 6.0.0",
131
+ "wasm-bindgen",
132
+ ]
133
+
134
+ [[package]]
135
+ name = "glob"
136
+ version = "0.3.4"
137
+ source = "registry+https://github.com/rust-lang/crates.io-index"
138
+ checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
139
+
140
+ [[package]]
141
+ name = "hashbrown"
142
+ version = "0.16.1"
143
+ source = "registry+https://github.com/rust-lang/crates.io-index"
144
+ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
145
+ dependencies = [
146
+ "allocator-api2",
147
+ "equivalent",
148
+ "foldhash",
149
+ ]
150
+
151
+ [[package]]
152
+ name = "itertools"
153
+ version = "0.13.0"
154
+ source = "registry+https://github.com/rust-lang/crates.io-index"
155
+ checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
156
+ dependencies = [
157
+ "either",
158
+ ]
159
+
160
+ [[package]]
161
+ name = "itoa"
162
+ version = "1.0.18"
163
+ source = "registry+https://github.com/rust-lang/crates.io-index"
164
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
165
+
166
+ [[package]]
167
+ name = "js-sys"
168
+ version = "0.3.105"
169
+ source = "registry+https://github.com/rust-lang/crates.io-index"
170
+ checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e"
171
+ dependencies = [
172
+ "cfg-if",
173
+ "wasm-bindgen",
174
+ ]
175
+
176
+ [[package]]
177
+ name = "lazy_static"
178
+ version = "1.5.0"
179
+ source = "registry+https://github.com/rust-lang/crates.io-index"
180
+ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
181
+
182
+ [[package]]
183
+ name = "libc"
184
+ version = "0.2.189"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
187
+
188
+ [[package]]
189
+ name = "libloading"
190
+ version = "0.8.9"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
193
+ dependencies = [
194
+ "cfg-if",
195
+ "windows-link",
196
+ ]
197
+
198
+ [[package]]
199
+ name = "log"
200
+ version = "0.4.34"
201
+ source = "registry+https://github.com/rust-lang/crates.io-index"
202
+ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
203
+
204
+ [[package]]
205
+ name = "magnus"
206
+ version = "0.9.0"
207
+ source = "git+https://github.com/matsadler/magnus?rev=9407bd9#9407bd98afef6692edca706426c15ea6bef60d0e"
208
+ dependencies = [
209
+ "magnus-macros",
210
+ "rb-sys",
211
+ "rb-sys-env",
212
+ "seq-macro",
213
+ ]
214
+
215
+ [[package]]
216
+ name = "magnus-macros"
217
+ version = "0.9.0"
218
+ source = "git+https://github.com/matsadler/magnus?rev=9407bd9#9407bd98afef6692edca706426c15ea6bef60d0e"
219
+ dependencies = [
220
+ "proc-macro2",
221
+ "quote",
222
+ "syn 2.0.119",
223
+ ]
224
+
225
+ [[package]]
226
+ name = "memchr"
227
+ version = "2.8.3"
228
+ source = "registry+https://github.com/rust-lang/crates.io-index"
229
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
230
+
231
+ [[package]]
232
+ name = "minimal-lexical"
233
+ version = "0.2.1"
234
+ source = "registry+https://github.com/rust-lang/crates.io-index"
235
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
236
+
237
+ [[package]]
238
+ name = "nom"
239
+ version = "7.1.3"
240
+ source = "registry+https://github.com/rust-lang/crates.io-index"
241
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
242
+ dependencies = [
243
+ "memchr",
244
+ "minimal-lexical",
245
+ ]
246
+
247
+ [[package]]
248
+ name = "once_cell"
249
+ version = "1.21.4"
250
+ source = "registry+https://github.com/rust-lang/crates.io-index"
251
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
252
+
253
+ [[package]]
254
+ name = "parsanol"
255
+ version = "0.7.0"
256
+ source = "git+https://github.com/parsanol/parsanol-rs?branch=main#e8a728fa2f99a72276c70fe9400a371cf47f39fb"
257
+ dependencies = [
258
+ "ahash",
259
+ "getrandom 0.3.4",
260
+ "getrandom 0.4.3",
261
+ "hashbrown",
262
+ "magnus",
263
+ "memchr",
264
+ "parsanol-derive",
265
+ "regex",
266
+ "serde",
267
+ "serde_json",
268
+ ]
269
+
270
+ [[package]]
271
+ name = "parsanol-derive"
272
+ version = "0.7.0"
273
+ source = "git+https://github.com/parsanol/parsanol-rs?branch=main#e8a728fa2f99a72276c70fe9400a371cf47f39fb"
274
+ dependencies = [
275
+ "proc-macro2",
276
+ "quote",
277
+ "syn 2.0.119",
278
+ ]
279
+
280
+ [[package]]
281
+ name = "parsanol_native"
282
+ version = "1.0.2"
283
+ dependencies = [
284
+ "log",
285
+ "magnus",
286
+ "parsanol",
287
+ "rb-sys",
288
+ ]
289
+
290
+ [[package]]
291
+ name = "proc-macro2"
292
+ version = "1.0.107"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
295
+ dependencies = [
296
+ "unicode-ident",
297
+ ]
298
+
299
+ [[package]]
300
+ name = "quote"
301
+ version = "1.0.47"
302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
303
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
304
+ dependencies = [
305
+ "proc-macro2",
306
+ ]
307
+
308
+ [[package]]
309
+ name = "r-efi"
310
+ version = "5.3.0"
311
+ source = "registry+https://github.com/rust-lang/crates.io-index"
312
+ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
313
+
314
+ [[package]]
315
+ name = "r-efi"
316
+ version = "6.0.0"
317
+ source = "registry+https://github.com/rust-lang/crates.io-index"
318
+ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
319
+
320
+ [[package]]
321
+ name = "rb-sys"
322
+ version = "0.9.126"
323
+ source = "git+https://github.com/oxidize-rb/rb-sys.git?rev=daa12b6521a0c442a705d7f9a929029119aab1d6#daa12b6521a0c442a705d7f9a929029119aab1d6"
324
+ dependencies = [
325
+ "rb-sys-build",
326
+ ]
327
+
328
+ [[package]]
329
+ name = "rb-sys-build"
330
+ version = "0.9.126"
331
+ source = "git+https://github.com/oxidize-rb/rb-sys.git?rev=daa12b6521a0c442a705d7f9a929029119aab1d6#daa12b6521a0c442a705d7f9a929029119aab1d6"
332
+ dependencies = [
333
+ "bindgen",
334
+ "lazy_static",
335
+ "proc-macro2",
336
+ "quote",
337
+ "regex",
338
+ "shell-words",
339
+ "syn 2.0.119",
340
+ ]
341
+
342
+ [[package]]
343
+ name = "rb-sys-env"
344
+ version = "0.2.3"
345
+ source = "registry+https://github.com/rust-lang/crates.io-index"
346
+ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
347
+
348
+ [[package]]
349
+ name = "regex"
350
+ version = "1.13.1"
351
+ source = "registry+https://github.com/rust-lang/crates.io-index"
352
+ checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
353
+ dependencies = [
354
+ "aho-corasick",
355
+ "memchr",
356
+ "regex-automata",
357
+ "regex-syntax",
358
+ ]
359
+
360
+ [[package]]
361
+ name = "regex-automata"
362
+ version = "0.4.18"
363
+ source = "registry+https://github.com/rust-lang/crates.io-index"
364
+ checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
365
+ dependencies = [
366
+ "aho-corasick",
367
+ "memchr",
368
+ "regex-syntax",
369
+ ]
370
+
371
+ [[package]]
372
+ name = "regex-syntax"
373
+ version = "0.8.11"
374
+ source = "registry+https://github.com/rust-lang/crates.io-index"
375
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
376
+
377
+ [[package]]
378
+ name = "rustc-hash"
379
+ version = "2.1.3"
380
+ source = "registry+https://github.com/rust-lang/crates.io-index"
381
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
382
+
383
+ [[package]]
384
+ name = "rustversion"
385
+ version = "1.0.23"
386
+ source = "registry+https://github.com/rust-lang/crates.io-index"
387
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
388
+
389
+ [[package]]
390
+ name = "seq-macro"
391
+ version = "0.3.6"
392
+ source = "registry+https://github.com/rust-lang/crates.io-index"
393
+ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
394
+
395
+ [[package]]
396
+ name = "serde"
397
+ version = "1.0.229"
398
+ source = "registry+https://github.com/rust-lang/crates.io-index"
399
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
400
+ dependencies = [
401
+ "serde_core",
402
+ "serde_derive",
403
+ ]
404
+
405
+ [[package]]
406
+ name = "serde_core"
407
+ version = "1.0.229"
408
+ source = "registry+https://github.com/rust-lang/crates.io-index"
409
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
410
+ dependencies = [
411
+ "serde_derive",
412
+ ]
413
+
414
+ [[package]]
415
+ name = "serde_derive"
416
+ version = "1.0.229"
417
+ source = "registry+https://github.com/rust-lang/crates.io-index"
418
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
419
+ dependencies = [
420
+ "proc-macro2",
421
+ "quote",
422
+ "syn 3.0.5",
423
+ ]
424
+
425
+ [[package]]
426
+ name = "serde_json"
427
+ version = "1.0.151"
428
+ source = "registry+https://github.com/rust-lang/crates.io-index"
429
+ checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
430
+ dependencies = [
431
+ "itoa",
432
+ "memchr",
433
+ "serde",
434
+ "serde_core",
435
+ "zmij",
436
+ ]
437
+
438
+ [[package]]
439
+ name = "shell-words"
440
+ version = "1.1.1"
441
+ source = "registry+https://github.com/rust-lang/crates.io-index"
442
+ checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"
443
+
444
+ [[package]]
445
+ name = "shlex"
446
+ version = "1.3.0"
447
+ source = "registry+https://github.com/rust-lang/crates.io-index"
448
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
449
+
450
+ [[package]]
451
+ name = "syn"
452
+ version = "2.0.119"
453
+ source = "registry+https://github.com/rust-lang/crates.io-index"
454
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
455
+ dependencies = [
456
+ "proc-macro2",
457
+ "quote",
458
+ "unicode-ident",
459
+ ]
460
+
461
+ [[package]]
462
+ name = "syn"
463
+ version = "3.0.5"
464
+ source = "registry+https://github.com/rust-lang/crates.io-index"
465
+ checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9"
466
+ dependencies = [
467
+ "proc-macro2",
468
+ "quote",
469
+ "unicode-ident",
470
+ ]
471
+
472
+ [[package]]
473
+ name = "unicode-ident"
474
+ version = "1.0.24"
475
+ source = "registry+https://github.com/rust-lang/crates.io-index"
476
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
477
+
478
+ [[package]]
479
+ name = "version_check"
480
+ version = "0.9.5"
481
+ source = "registry+https://github.com/rust-lang/crates.io-index"
482
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
483
+
484
+ [[package]]
485
+ name = "wasip2"
486
+ version = "1.0.4+wasi-0.2.12"
487
+ source = "registry+https://github.com/rust-lang/crates.io-index"
488
+ checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
489
+ dependencies = [
490
+ "wit-bindgen",
491
+ ]
492
+
493
+ [[package]]
494
+ name = "wasm-bindgen"
495
+ version = "0.2.128"
496
+ source = "registry+https://github.com/rust-lang/crates.io-index"
497
+ checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf"
498
+ dependencies = [
499
+ "cfg-if",
500
+ "once_cell",
501
+ "rustversion",
502
+ "wasm-bindgen-macro",
503
+ "wasm-bindgen-shared",
504
+ ]
505
+
506
+ [[package]]
507
+ name = "wasm-bindgen-macro"
508
+ version = "0.2.128"
509
+ source = "registry+https://github.com/rust-lang/crates.io-index"
510
+ checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed"
511
+ dependencies = [
512
+ "quote",
513
+ "wasm-bindgen-macro-support",
514
+ ]
515
+
516
+ [[package]]
517
+ name = "wasm-bindgen-macro-support"
518
+ version = "0.2.128"
519
+ source = "registry+https://github.com/rust-lang/crates.io-index"
520
+ checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a"
521
+ dependencies = [
522
+ "bumpalo",
523
+ "proc-macro2",
524
+ "quote",
525
+ "syn 3.0.5",
526
+ "wasm-bindgen-shared",
527
+ ]
528
+
529
+ [[package]]
530
+ name = "wasm-bindgen-shared"
531
+ version = "0.2.128"
532
+ source = "registry+https://github.com/rust-lang/crates.io-index"
533
+ checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e"
534
+ dependencies = [
535
+ "unicode-ident",
536
+ ]
537
+
538
+ [[package]]
539
+ name = "windows-link"
540
+ version = "0.2.1"
541
+ source = "registry+https://github.com/rust-lang/crates.io-index"
542
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
543
+
544
+ [[package]]
545
+ name = "wit-bindgen"
546
+ version = "0.57.1"
547
+ source = "registry+https://github.com/rust-lang/crates.io-index"
548
+ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
549
+
550
+ [[package]]
551
+ name = "zerocopy"
552
+ version = "0.8.57"
553
+ source = "registry+https://github.com/rust-lang/crates.io-index"
554
+ checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873"
555
+ dependencies = [
556
+ "zerocopy-derive",
557
+ ]
558
+
559
+ [[package]]
560
+ name = "zerocopy-derive"
561
+ version = "0.8.57"
562
+ source = "registry+https://github.com/rust-lang/crates.io-index"
563
+ checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc"
564
+ dependencies = [
565
+ "proc-macro2",
566
+ "quote",
567
+ "syn 2.0.119",
568
+ ]
569
+
570
+ [[package]]
571
+ name = "zmij"
572
+ version = "1.0.23"
573
+ source = "registry+https://github.com/rust-lang/crates.io-index"
574
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
data/Cargo.toml ADDED
@@ -0,0 +1,18 @@
1
+ [workspace]
2
+ resolver = "2"
3
+ members = ["ext/parsanol_native"]
4
+
5
+ [profile.release]
6
+ opt-level = 3
7
+ lto = "off"
8
+ codegen-units = 1
9
+ debug = true
10
+
11
+ # Patches for Ruby 4.0 support and 32-bit musl (magnus timespec fix).
12
+ # magnus 0.9 is not on crates.io yet; pin a git rev that includes
13
+ # https://github.com/matsadler/magnus/pull/183 (32-bit musl timespec).
14
+ # parsanol-rs must use the same rev (direct git dep, not patchable here).
15
+ [patch.crates-io]
16
+ magnus = { git = "https://github.com/matsadler/magnus", rev = "9407bd9" }
17
+ magnus-macros = { git = "https://github.com/matsadler/magnus", rev = "9407bd9" }
18
+ rb-sys = { git = "https://github.com/oxidize-rb/rb-sys.git", rev = "daa12b6521a0c442a705d7f9a929029119aab1d6" }
data/HISTORY.txt ADDED
@@ -0,0 +1,98 @@
1
+ == Parsanol 1.3.0 (unreleased)
2
+
3
+ Breaking changes:
4
+
5
+ * Simplified API: Single `parse()` method with lazy line/column
6
+ * Removed deprecated methods: `parse_parslet`, `parse_parslet_with_positions`,
7
+ `parse_with_transform`, `parse_to_objects`, `parse_raw`
8
+
9
+ New features:
10
+
11
+ * Lazy line/column computation in `Slice#line_and_column` - computed only when accessed
12
+ * `BatchDecoder` module for efficient batch AST processing
13
+ * Grammar accepts Ruby atoms directly - no JSON serialization step needed
14
+
15
+ Bug fixes:
16
+
17
+ * Fixed grammar cache cycle detection to prevent stack overflow on recursive grammars
18
+ * Fixed wrapper vs repetition pattern detection in `AstTransformer`:
19
+ - Same inner keys → Repetition pattern (keep as array)
20
+ - Different inner keys → Wrapper pattern (merge inner hashes)
21
+ * Correct entity extraction for grammars with multiple declarations
22
+
23
+ == Parsanol 1.2.2 (2026-03-07)
24
+
25
+ Syncs with parsanol-rs 0.3.0:
26
+
27
+ * Full FFI support for capture, scope, and dynamic atoms
28
+ * Native extension performance for all new features
29
+ * BuilderCallbacks module for streaming parsing
30
+
31
+ == Parsanol 1.2.1 (2026-03-07)
32
+
33
+ Bug fix:
34
+
35
+ * Fix native extension loading for precompiled gems (rb_sys version-specific paths)
36
+
37
+ == Parsanol 1.2.0 (2026-03-07)
38
+
39
+ New features for advanced parsing scenarios:
40
+
41
+ === Capture Atoms
42
+
43
+ Extract named values from parsed input without building full AST:
44
+
45
+ * `atom.capture(:name)` - Capture matched text by name
46
+ * Zero-copy extraction using offset/length
47
+ * Works across all backends (Packrat, Bytecode, Streaming)
48
+
49
+ === Scope Atoms
50
+
51
+ Create isolated capture contexts for nested parsing:
52
+
53
+ * `scope { inner }` - Discards inner captures on exit
54
+ * Prevents capture pollution in recursive structures
55
+ * Memory-bounded parsing for repeated patterns
56
+
57
+ === Dynamic Atoms
58
+
59
+ Runtime-determined parsing via FFI callbacks:
60
+
61
+ * `dynamic { |ctx| parser }` - Context-sensitive parsing
62
+ * Access captures, position, and input in callback
63
+ * Full Packrat backend support
64
+
65
+ === Native Extension Updates
66
+
67
+ * Updated to parsanol-rs 0.3.0
68
+ * New backend abstraction (Packrat, Bytecode, Auto)
69
+ * Streaming parser with capture extraction
70
+ * Performance improvements
71
+
72
+ == Parsanol 1.1.0 (2026-03-05)
73
+
74
+ Position information is now returned by default:
75
+
76
+ * All parse methods return `Parsanol::Slice` objects
77
+ * `Slice#offset`, `#length`, `#line_and_column` methods
78
+ * Zero-copy extraction via `Slice#extract_from(input)`
79
+ * JSON output format includes position inline
80
+
81
+ Performance improvements:
82
+
83
+ * Native extension ~20x faster than pure Ruby
84
+ * ZeroCopy API for direct FFI object construction
85
+ * Parallel batch parsing with `Parsanol::Parallel`
86
+
87
+ == Parsanol 1.0.0 (2026-03-03)
88
+
89
+ Initial release of Parsanol, a high-performance PEG parser library for Ruby.
90
+
91
+ Features:
92
+
93
+ * Parslet-compatible API for easy migration
94
+ * Optional Rust native extension for 17-42x faster parsing
95
+ * Static frozen parsers for thread-safe operation
96
+ * Dynamic parsers for mutable grammars
97
+ * Great error reporting with source location tracking
98
+ * Packrat memoization for O(n) parsing complexity