lexer_kit 0.6.0 → 0.7.0

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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +265 -0
  3. data/Cargo.toml +37 -0
  4. data/README.md +7 -3
  5. data/crates/lexer_kit_core/Cargo.toml +17 -0
  6. data/crates/lexer_kit_core/src/dfa.rs +437 -0
  7. data/crates/lexer_kit_core/src/format.rs +599 -0
  8. data/crates/lexer_kit_core/src/lib.rs +18 -0
  9. data/{ext/lexer_kit_rust → crates/lexer_kit_core}/src/opcodes.rs +375 -1
  10. data/{ext/lexer_kit_rust → crates/lexer_kit_core}/src/safety_test.rs +21 -16
  11. data/crates/lexer_kit_core/src/token_buffer.rs +130 -0
  12. data/{ext/lexer_kit_rust → crates/lexer_kit_core}/src/trie.rs +37 -1
  13. data/{ext/lexer_kit_rust → crates/lexer_kit_core}/src/types.rs +1 -1
  14. data/{ext/lexer_kit_rust → crates/lexer_kit_core}/src/vm.rs +165 -2
  15. data/ext/lexer_kit_rust/Cargo.toml +7 -3
  16. data/ext/lexer_kit_rust/src/fast_stream.rs +101 -438
  17. data/ext/lexer_kit_rust/src/lib.rs +200 -215
  18. data/lib/lexer_kit/builder/compiler.rb +50 -15
  19. data/lib/lexer_kit/builder/conflict_detector.rb +18 -20
  20. data/lib/lexer_kit/builder/validator.rb +45 -0
  21. data/lib/lexer_kit/builder.rb +34 -7
  22. data/lib/lexer_kit/cli/commands.rb +17 -7
  23. data/lib/lexer_kit/core/source.rb +3 -2
  24. data/lib/lexer_kit/debug/disassembler.rb +0 -2
  25. data/lib/lexer_kit/dfa/dfa_builder.rb +1 -1
  26. data/lib/lexer_kit/dfa/dfa_minimizer.rb +2 -2
  27. data/lib/lexer_kit/dfa/regex_ast.rb +4 -0
  28. data/lib/lexer_kit/dfa/regex_parser.rb +41 -8
  29. data/lib/lexer_kit/errors.rb +2 -2
  30. data/lib/lexer_kit/format/lkb1.rb +3 -3
  31. data/lib/lexer_kit/format/lkt1.rb +3 -1
  32. data/lib/lexer_kit/format.rb +4 -4
  33. data/lib/lexer_kit/ir/compiled_program.rb +39 -26
  34. data/lib/lexer_kit/ir/constant_pool.rb +33 -11
  35. data/lib/lexer_kit/ir/dfa_table.rb +9 -19
  36. data/lib/lexer_kit/ir/instruction.rb +3 -0
  37. data/lib/lexer_kit/ir/jump_table.rb +3 -13
  38. data/lib/lexer_kit/ir/keyword_table.rb +0 -9
  39. data/lib/lexer_kit/ir/limits.rb +48 -0
  40. data/lib/lexer_kit/ir/serializer.rb +69 -30
  41. data/lib/lexer_kit/ir.rb +1 -0
  42. data/lib/lexer_kit/trie.rb +1 -1
  43. data/lib/lexer_kit/version.rb +1 -1
  44. data/lib/lexer_kit.rb +20 -2
  45. data/vendor/nupur/Cargo.toml +24 -0
  46. data/vendor/nupur/LICENSE +176 -0
  47. data/vendor/nupur/NOTICE +64 -0
  48. data/vendor/nupur/README.ja.md +150 -0
  49. data/vendor/nupur/README.md +257 -0
  50. data/vendor/nupur/src/abi.rs +143 -0
  51. data/vendor/nupur/src/args.rs +318 -0
  52. data/vendor/nupur/src/build.rs +101 -0
  53. data/vendor/nupur/src/caught.rs +171 -0
  54. data/vendor/nupur/src/cname.rs +37 -0
  55. data/vendor/nupur/src/describe.rs +175 -0
  56. data/vendor/nupur/src/encoding.rs +240 -0
  57. data/vendor/nupur/src/gvl.rs +181 -0
  58. data/vendor/nupur/src/hash.rs +52 -0
  59. data/vendor/nupur/src/inject.rs +20 -0
  60. data/vendor/nupur/src/lib.rs +280 -0
  61. data/vendor/nupur/src/lint_probe.rs +142 -0
  62. data/vendor/nupur/src/msg.rs +193 -0
  63. data/vendor/nupur/src/no_unwind.rs +39 -0
  64. data/vendor/nupur/src/raw/check.rs +71 -0
  65. data/vendor/nupur/src/raw/data.rs +28 -0
  66. data/vendor/nupur/src/raw/define.rs +215 -0
  67. data/vendor/nupur/src/raw/exception.rs +69 -0
  68. data/vendor/nupur/src/raw/iterate.rs +115 -0
  69. data/vendor/nupur/src/raw/mod.rs +105 -0
  70. data/vendor/nupur/src/raw/protect.rs +144 -0
  71. data/vendor/nupur/src/raw/string.rs +148 -0
  72. data/vendor/nupur/src/raw/symbol.rs +38 -0
  73. data/vendor/nupur/src/raw/values.rs +293 -0
  74. data/vendor/nupur/src/rb/call.rs +118 -0
  75. data/vendor/nupur/src/rb/class.rs +170 -0
  76. data/vendor/nupur/src/rb/convert.rs +134 -0
  77. data/vendor/nupur/src/rb/error.rs +355 -0
  78. data/vendor/nupur/src/rb/global.rs +141 -0
  79. data/vendor/nupur/src/rb/kept.rs +55 -0
  80. data/vendor/nupur/src/rb/method/frame.rs +81 -0
  81. data/vendor/nupur/src/rb/method.rs +468 -0
  82. data/vendor/nupur/src/rb/mod.rs +40 -0
  83. data/vendor/nupur/src/rb/object.rs +66 -0
  84. data/vendor/nupur/src/rb/ruby.rs +107 -0
  85. data/vendor/nupur/src/rb/value/header.rs +65 -0
  86. data/vendor/nupur/src/rb/value/id.rs +61 -0
  87. data/vendor/nupur/src/rb/value/integer.rs +132 -0
  88. data/vendor/nupur/src/rb/value.rs +454 -0
  89. data/vendor/nupur/src/stack.rs +32 -0
  90. data/vendor/nupur/src/string/make.rs +234 -0
  91. data/vendor/nupur/src/string/mod.rs +24 -0
  92. data/vendor/nupur/src/string/read.rs +411 -0
  93. data/vendor/nupur/src/table.rs +58 -0
  94. data/vendor/nupur/src/typed/callbacks.rs +125 -0
  95. data/vendor/nupur/src/typed/data_type.rs +132 -0
  96. data/vendor/nupur/src/typed/embedded.rs +103 -0
  97. data/vendor/nupur/src/typed/external.rs +76 -0
  98. data/vendor/nupur/src/typed/hidden.rs +95 -0
  99. data/vendor/nupur/src/typed/mod.rs +373 -0
  100. data/vendor/nupur/src/utf8_copy.rs +262 -0
  101. data/vendor/nupur/sys/Cargo.toml +29 -0
  102. data/vendor/nupur/sys/src/data_type.rs +213 -0
  103. data/vendor/nupur/sys/src/int.rs +248 -0
  104. data/vendor/nupur/sys/src/lib.rs +61 -0
  105. data/vendor/nupur/sys/src/lint_probe.rs +93 -0
  106. data/vendor/nupur/sys/src/no_unwind.rs +99 -0
  107. data/vendor/nupur/sys/src/non_raising.rs +585 -0
  108. data/vendor/nupur/sys/src/protect.rs +349 -0
  109. data/vendor/nupur/sys/src/raising.rs +257 -0
  110. data/vendor/nupur/sys/src/value.rs +279 -0
  111. data/vendor/nupur.sha256 +68 -0
  112. metadata +102 -8
  113. data/ext/lexer_kit_rust/src/deserializer.rs +0 -213
  114. data/ext/lexer_kit_rust/src/dfa.rs +0 -217
@@ -0,0 +1,279 @@
1
+ //! The two proofs that code runs on a Ruby thread holding the GVL, which
2
+ //! every read of Ruby's C here takes ([`crate::non_raising`]): a Ruby value
3
+ //! ([`Value`]), for what reads one, and the GVL's token ([`Ruby`]), for what
4
+ //! reads none.
5
+ //!
6
+ //! A value is the proof because one exists only where Ruby runs: it is made
7
+ //! by an `unsafe fn` whose contract says so, and it is `!Send`, so a body
8
+ //! run with the GVL released cannot carry one. The token is made the same
9
+ //! way, where Ruby calls in (a method's trampoline, `Init_`, a GC callback),
10
+ //! and a value or the protection lends one ([`Value::ruby`],
11
+ //! [`crate::protect::Protected::ruby`]) for as long as it is borrowed.
12
+
13
+ #![allow(unsafe_code)]
14
+
15
+ use core::marker::PhantomData;
16
+
17
+ use rb_sys::VALUE;
18
+
19
+ /// A live Ruby value, of any kind: on a Ruby thread holding the GVL, and
20
+ /// kept where the GC finds it (a Rust local, which the stack scan sees) for
21
+ /// as long as it is used.
22
+ ///
23
+ /// `repr(transparent)`, so it is a `VALUE` to C. Made from a raw `VALUE`
24
+ /// only inside this crate (`Value::from_raw` is crate-private), and never
25
+ /// turned back into one outside it:
26
+ ///
27
+ /// ```compile_fail,E0603
28
+ /// let made = nupur_sys::value::Value(0, core::marker::PhantomData);
29
+ /// ```
30
+ #[derive(Clone, Copy)]
31
+ #[repr(transparent)]
32
+ pub struct Value(VALUE, PhantomData<*mut ()>);
33
+
34
+ impl Value {
35
+ /// The value a C call returned, or one Ruby passed in.
36
+ ///
37
+ /// # Safety
38
+ ///
39
+ /// `v` is a live Ruby value, on a Ruby thread holding the GVL, kept where
40
+ /// the GC finds it for as long as the `Value` is used.
41
+ #[inline(always)]
42
+ pub(crate) const unsafe fn from_raw(v: VALUE) -> Value {
43
+ Value(v, PhantomData)
44
+ }
45
+
46
+ /// The raw `VALUE`, for a C call - this crate's alone, so no other
47
+ /// holds a Ruby value as an integer.
48
+ #[inline(always)]
49
+ pub(crate) const fn as_raw(self) -> VALUE {
50
+ self.0
51
+ }
52
+
53
+ /// The same object (or immediate) as `other`?
54
+ #[inline(always)]
55
+ pub fn is(self, other: Value) -> bool {
56
+ self.0 == other.0
57
+ }
58
+
59
+ /// `nil`?
60
+ #[inline(always)]
61
+ pub fn is_nil(self) -> bool {
62
+ self.0 == rb_sys::Qnil as VALUE
63
+ }
64
+
65
+ /// `Qundef`?
66
+ #[inline(always)]
67
+ pub fn is_undef(self) -> bool {
68
+ self.0 == rb_sys::Qundef as VALUE
69
+ }
70
+
71
+ /// `true`?
72
+ #[inline(always)]
73
+ pub fn is_true(self) -> bool {
74
+ self.0 == rb_sys::Qtrue as VALUE
75
+ }
76
+
77
+ /// The GVL's token this value proves, for a read that takes no value
78
+ /// (a C global's class, say), lent for the borrow of the value.
79
+ #[inline(always)]
80
+ pub fn ruby(&self) -> &Ruby {
81
+ &TOKEN
82
+ }
83
+ }
84
+
85
+ /// The GVL, held: a Ruby thread, between Ruby's call in and its return.
86
+ ///
87
+ /// A zero-sized token, neither `Send` nor `Sync`, made only by
88
+ /// [`Ruby::assume_gvl`] outside this crate:
89
+ ///
90
+ /// ```compile_fail,E0603
91
+ /// let made = nupur_sys::value::Ruby(core::marker::PhantomData);
92
+ /// ```
93
+ pub struct Ruby(PhantomData<*mut ()>);
94
+
95
+ /// The one token a value or the protection lends.
96
+ const TOKEN: Ruby = Ruby(PhantomData);
97
+
98
+ impl Ruby {
99
+ /// The token, on the caller's word that the GVL is held - the one maker
100
+ /// of a token from nothing, for where Ruby has called in.
101
+ ///
102
+ /// # Safety
103
+ ///
104
+ /// On a Ruby thread holding the GVL, for as long as the token is used.
105
+ #[inline(always)]
106
+ pub unsafe fn assume_gvl() -> Ruby {
107
+ Ruby(PhantomData)
108
+ }
109
+
110
+ /// `nil`.
111
+ #[inline(always)]
112
+ pub fn qnil(&self) -> Value {
113
+ // SAFETY: an immediate, and the token is the GVL.
114
+ unsafe { Value::from_raw(rb_sys::Qnil as VALUE) }
115
+ }
116
+
117
+ /// `true`.
118
+ #[inline(always)]
119
+ pub fn qtrue(&self) -> Value {
120
+ // SAFETY: as `qnil`.
121
+ unsafe { Value::from_raw(rb_sys::Qtrue as VALUE) }
122
+ }
123
+
124
+ /// `false`.
125
+ #[inline(always)]
126
+ pub fn qfalse(&self) -> Value {
127
+ // SAFETY: as `qnil`.
128
+ unsafe { Value::from_raw(rb_sys::Qfalse as VALUE) }
129
+ }
130
+
131
+ /// `Qundef`, the C API's "no value" - never a Ruby object, and never
132
+ /// handed to Ruby code; a lookup's default, compared with
133
+ /// [`Value::is_undef`].
134
+ #[inline(always)]
135
+ pub fn qundef(&self) -> Value {
136
+ // SAFETY: as `qnil`.
137
+ unsafe { Value::from_raw(rb_sys::Qundef as VALUE) }
138
+ }
139
+
140
+ /// The Fixnum `n` is (`LONG2FIX`), or `None` past a Fixnum's range
141
+ /// (`int::fixnum`, crate-private).
142
+ #[inline(always)]
143
+ pub fn fixnum(&self, n: i64) -> Option<Value> {
144
+ // SAFETY: an immediate, built from its bits.
145
+ crate::int::fixnum(n).map(|v| unsafe { Value::from_raw(v) })
146
+ }
147
+
148
+ /// [`Ruby::fixnum`] for an unsigned value.
149
+ #[inline(always)]
150
+ pub fn posfixnum(&self, n: u64) -> Option<Value> {
151
+ // SAFETY: as `fixnum`.
152
+ crate::int::posfixnum(n).map(|v| unsafe { Value::from_raw(v) })
153
+ }
154
+
155
+ /// The flonum `f` is, or `None` where Ruby would make a heap Float
156
+ /// (`int::flonum`, crate-private).
157
+ #[inline(always)]
158
+ pub fn flonum(&self, f: f64) -> Option<Value> {
159
+ // SAFETY: an immediate, built from its bits as Ruby builds it.
160
+ crate::int::flonum(f).map(|v| unsafe { Value::from_raw(v) })
161
+ }
162
+
163
+ /// The token, lent for the protection's borrow (`Protected::ruby`).
164
+ #[inline(always)]
165
+ pub(crate) fn lent() -> &'static Ruby {
166
+ &TOKEN
167
+ }
168
+ }
169
+
170
+ /// A Ruby value kept in a TypedData object's slot: on the heap, where the
171
+ /// stack scan does not see it and the object's mark callback marks it
172
+ /// ([`crate::non_raising::gc_mark_in_dmark`]). The one form in which a value may
173
+ /// live outside a Rust local.
174
+ ///
175
+ /// `repr(transparent)`, and `!Send`, as a value is. Made from a value, which
176
+ /// is safe - it is a value's bits, kept - and read back as one only under a
177
+ /// contract, since a slot read where its object is gone is a stale word.
178
+ #[derive(Clone, Copy)]
179
+ #[repr(transparent)]
180
+ pub struct Root(VALUE, PhantomData<*mut ()>);
181
+
182
+ impl Root {
183
+ /// `v`, to be kept in a slot.
184
+ #[inline(always)]
185
+ pub fn of(v: Value) -> Root {
186
+ Root(v.0, PhantomData)
187
+ }
188
+
189
+ /// The value this slot keeps.
190
+ ///
191
+ /// # Safety
192
+ ///
193
+ /// The slot is one of a live object's, which its mark callback marks, read
194
+ /// on a Ruby thread holding the GVL.
195
+ #[inline(always)]
196
+ pub unsafe fn value(self) -> Value {
197
+ Value(self.0, PhantomData)
198
+ }
199
+
200
+ /// The word, for the mark.
201
+ #[inline(always)]
202
+ pub(crate) fn as_raw(self) -> VALUE {
203
+ self.0
204
+ }
205
+ }
206
+
207
+ /// Keep `v` alive to this point (CRuby's `RB_GC_GUARD`): hand it to an empty
208
+ /// inline assembly block as an input operand, so it is in a register here.
209
+ ///
210
+ /// The contract relied on is the Rust Reference's for `asm!`, and only this
211
+ /// much of it: an input operand is in its register when the block runs, and
212
+ /// a block without `pure` is taken to have side effects and is not removed.
213
+ /// Without `nomem` or `readonly` the block may read and write memory, as may
214
+ /// the libruby calls that can collect, so the two stay in program order.
215
+ /// (`core::hint::black_box`, which this replaced, is documented as
216
+ /// best-effort, not to be relied on.)
217
+ ///
218
+ /// That `v` is ALSO where the scan finds it at each collection before this
219
+ /// point follows from premises, not from the block: a collection runs only
220
+ /// inside a call into libruby, with the GVL held; those calls are opaque to
221
+ /// the optimizer (libruby is linked dynamically, with no LTO across it), so
222
+ /// a value used after one is kept across it in a callee-saved register or a
223
+ /// stack slot; and CRuby's mark saves the registers with `setjmp` and scans
224
+ /// the machine stack, which finds either.
225
+ #[cfg(any(
226
+ target_arch = "x86",
227
+ target_arch = "x86_64",
228
+ target_arch = "arm",
229
+ target_arch = "aarch64",
230
+ target_arch = "arm64ec",
231
+ target_arch = "riscv32",
232
+ target_arch = "riscv64",
233
+ target_arch = "loongarch64",
234
+ target_arch = "s390x"
235
+ ))]
236
+ #[inline(always)]
237
+ pub fn keep_alive(v: Value) {
238
+ let raw: VALUE = v.0;
239
+ // SAFETY: the template is a comment: no instruction, no register or
240
+ // memory written, the stack untouched (`nostack`) and the flags kept.
241
+ unsafe {
242
+ core::arch::asm!("/* keep {0} */", in(reg) raw, options(nostack, preserves_flags));
243
+ }
244
+ }
245
+
246
+ /// [`keep_alive`] where `asm!` is not stable (PowerPC, MIPS, SPARC, ...):
247
+ /// `v` put in a local and read back with `read_volatile` - the means rb-sys's
248
+ /// `rb_gc_guard!` uses, written here so its `unsafe` is this file's, counted
249
+ /// by `rake unsafe:boundaries`.
250
+ ///
251
+ /// What it relies on is weaker than the `asm!` contract: `core::ptr`'s
252
+ /// documentation says a volatile access is not elided or reordered with
253
+ /// other volatile accesses, and also that Rust's volatile has no rigorously
254
+ /// defined semantics yet ("pretty similar to C11's"). The read needs the
255
+ /// value in the local at that point, which is what the `asm!` block gives,
256
+ /// and the same premises carry it back to each collection before. Unlike the
257
+ /// `asm!` targets, the generated code has not been checked on any of these.
258
+ /// (`rb_gc_guarded_ptr_val`, CRuby's out-of-line `RB_GC_GUARD`, is no
259
+ /// fallback: libruby has it only when built by neither GCC, clang nor MSVC.)
260
+ #[cfg(not(any(
261
+ target_arch = "x86",
262
+ target_arch = "x86_64",
263
+ target_arch = "arm",
264
+ target_arch = "aarch64",
265
+ target_arch = "arm64ec",
266
+ target_arch = "riscv32",
267
+ target_arch = "riscv64",
268
+ target_arch = "loongarch64",
269
+ target_arch = "s390x"
270
+ )))]
271
+ #[inline(always)]
272
+ pub fn keep_alive(v: Value) {
273
+ let raw: VALUE = v.0;
274
+ // SAFETY: `raw` is a local of this frame, aligned and initialised, and
275
+ // read once; reading a `VALUE` (an integer) has no other effect.
276
+ unsafe {
277
+ core::ptr::read_volatile(&raw);
278
+ }
279
+ }
@@ -0,0 +1,68 @@
1
+ # Nupur の写しの内容。rake nupur:vendor が書く。手で編集しない。
2
+ # https://github.com/takahashim/makiri v0.17.1 54b17ace85d4342c44db5dbe89f89eb12dd415ee
3
+ 48ebcf38af6685a5f91500b883d742d133a079026495d3797c8d3f9c9430483b Cargo.toml
4
+ 06f62ab96b052c1c2c2b589d1b4f59b6524a1e3928071079140cf98e389b580e LICENSE
5
+ 17a9036fc35612a15fb01c55152671cefd446defc1718b525482635e1140eda6 NOTICE
6
+ 14b20ab672ffb4749abcba59959d7e24db25ad17a1cbce51c0c54c9b9171de8d README.ja.md
7
+ ccc4c1d0fc5cde25789ff1cd822e1b6307875e8cc1af0ce15ace421b930907fd README.md
8
+ 9761bb6426797274196eb9713d717e44695a98573df42083e7c93a753f94fd15 src/abi.rs
9
+ eb46cd127ff588efd6aa7ea88e02fb2e4321bed4bdf919cbf1c909d2deb06cd1 src/args.rs
10
+ 894c578960edac9c4169ed495d91247bedc005ee5aa3eb0b77e35a6a6ff12757 src/build.rs
11
+ e7efe365b9f52a2191f76c959574d483c33089762d7d3d3ab9fb940d3ba18c0f src/caught.rs
12
+ 9ab1a40c4d04eb44ebe8813bc4be46e2cd3a611a84cb1cf705789043edd34fab src/cname.rs
13
+ 8facd1042b94760458c353a664838a1ee81a0f350815a32e3af128d1e80b901e src/describe.rs
14
+ b056aed93b03b23c23f8fb57543ece4537d87172eff7484794664df293028ab6 src/encoding.rs
15
+ 11c11b0b673feeb804be73f472411d4f7cb19ea050e4fa57c36342f76812031a src/gvl.rs
16
+ 54dffd4a41381db56d1930b6f9daa35c4546eb5dbc8961698d7791aebda41baf src/hash.rs
17
+ 9bfbd860cc55550e988b2eb7fee416bd2f090961d790a2a69a9efef926182242 src/inject.rs
18
+ e4d9608908fb04886aa1374cf5e063f2f2a72981e434e29218efccdca6669774 src/lib.rs
19
+ cdd4482fd7e3336cd2d1c462fda8ab1861e0393d4ae1936d9910fbdd0983e4f6 src/lint_probe.rs
20
+ 7f5d8b504d938705814c2b149a8e9aa1ee0b289b6c95499f169bf86953d95464 src/msg.rs
21
+ 4ba64ae7b3086765f420f86c8d60d620c971176c856512ca579956be18e017c0 src/no_unwind.rs
22
+ b4865a0285b9c6c685ef232717815a688cdbac0bdae1c7de7cab150b456f60a8 src/raw/check.rs
23
+ 49d2e3a9c31c665f16034dd2aa4260340c4eaf654cde911c827f8f57d255cee4 src/raw/data.rs
24
+ 71d94d6be9ab4e7485e50270f46dfb461c03bb3f49e441b883eff011cb7fca5f src/raw/define.rs
25
+ 4e7162a811b115cdaa2a4daaff4cb76a1408f96987c5a646168404ac507ea26d src/raw/exception.rs
26
+ 3ebae7e088628955f0bb89dffd01648d2b84e21d3e8ccdff0244899052fcb4a8 src/raw/iterate.rs
27
+ 235b6363aac32f8646b949454aa09e48015141661c32d97e2d8e0013b2dfac85 src/raw/mod.rs
28
+ 216aa3e7ddb80462bf3ff465e5ac5c6fa16489e5846e08ebe60d5b67f16b48e7 src/raw/protect.rs
29
+ a3d1ecd24c78d5b7e972b930284cecf3fa55bffa9c5062ceb2a3ebee085ec6fe src/raw/string.rs
30
+ 8aeb9790063e1b7f9b522c31b738d90be528d97fbbf24369cad8a58e414d3514 src/raw/symbol.rs
31
+ 4414c79c4885ae2dff79e9544b0f74718395eb0795cae3523e14bdd1d4c93499 src/raw/values.rs
32
+ f2bc439da9113794d5c428ff8d26299a47761ae4a8647e2c96d7b5391bd9527c src/rb/call.rs
33
+ 0dfe4c53f964332890f328389df3e0e0cd1e8dd65cb48f11d69fa756650a6e2a src/rb/class.rs
34
+ 74d6193df66b4fe0743e7f70c64c3954fa18e4b265ce778fd4fd5cb24aa10565 src/rb/convert.rs
35
+ 297b19aef62d5c3e3677ff72c6f1bc57cc0ba7e3ce70df3afdca78a24ef8aa01 src/rb/error.rs
36
+ 69dfb1d7f7eaad529668d1c8e8fc60b3bb1365625a1eac51f74d1000d9cffb88 src/rb/global.rs
37
+ df3ae78935de8ce6cd2a97f1590e759b6faf690593f8c68b213a1146d34353da src/rb/kept.rs
38
+ ee50d230dddb950a46dc8b4e3ec05f2a523f07ce457c562f2deffaffcb1a7495 src/rb/method.rs
39
+ 4757a026ebe97501461b0d1eee1efe3ddc9bc334135033d6d220bc0d8abed67b src/rb/method/frame.rs
40
+ f1f737c94233ecff0ec53f453a7408a4b0374b1dc0a19a195305a33287fe3d9c src/rb/mod.rs
41
+ 496d965b56f0179f83ee1266e3a2d51a665f777dac34b00820369258df75d886 src/rb/object.rs
42
+ e853d19f56303eabcf6075b94f2c45e3ceaaabfd6a5e656e0ce00a7c4d7e4d42 src/rb/ruby.rs
43
+ 42524b1e63e90afd044a894072ee66dee8055aa4b2e83aa962e2e18e9181c3e1 src/rb/value.rs
44
+ 26e895cd9874ddba3cf280e8ad62997009b6a132d5e6271ad2da868b8ecf653a src/rb/value/header.rs
45
+ cf6c78f76ab8552cfc0a8c23dfebc58167aa7fd954015d86c54d68795bb3dc78 src/rb/value/id.rs
46
+ 206250cd274d061653d4846821735f8ca9d794b31600848ab540cbc59985a972 src/rb/value/integer.rs
47
+ 49d429a8f8fe5527a62bb81372374fd01e17d6d9f514b2a4ab8664a5f9b77cd1 src/stack.rs
48
+ 5f94d9ba395796942dabe3b194391e37805e258518152d2ba77e3ceceef72f4b src/string/make.rs
49
+ 775ee1ec1798abd680edc38e89f1a5579de2881bf637dd602d7aae9f1f7bb42a src/string/mod.rs
50
+ 15a422430364caf3ae1c1314b6b8961489ca2f4d29cae86370114789830ab898 src/string/read.rs
51
+ 9518dfbcac32b89fb58868ac5b99dbe4973707906ce78c4c28329ed640e6e45e src/table.rs
52
+ 6f9c0bef92e0f99df55906180579f9f87c02c6f3354e2f32a3449cd96fc37628 src/typed/callbacks.rs
53
+ 3f18f4a8563bf4b4d413b67a3859ac40bf4e1bf2b4ad24519de0ca8127296285 src/typed/data_type.rs
54
+ 7bf81a0c7803dab1916fcd90e7ceacc2021928a85ec6de222856eb15bf7df163 src/typed/embedded.rs
55
+ d3c2630c8d012170ede03c3400ae2948318b9f13832f78421ccaf1000c0e8394 src/typed/external.rs
56
+ 8df8ce8f476ee6c7b0289badd32806d4fa8de0b71c9e2548384a8401a6bcfa53 src/typed/hidden.rs
57
+ d13b1043bdeeb41229afe562976d420ae9bdfa229eb179eb9461ea7a2934dcab src/typed/mod.rs
58
+ 2bedfba01a61961cc05dccb3e82d9cffd43207afd5afe05aea1fae2a9d69889f src/utf8_copy.rs
59
+ bfebc32b8f096192220eebd56e984873ea509cec9b24ab686c50e422da7270e3 sys/Cargo.toml
60
+ b6f7a697cc7a78e3172072c05f58cc2f2c13128c74ad54df4e3664aa250fea94 sys/src/data_type.rs
61
+ 29729269b5f13b37b54d050414aa16d9ec58b56711191a20dc2da9597d47efa9 sys/src/int.rs
62
+ c3ca1645c3734686f53db1fbc5535380d1d9058cb6c4e1caec4087c41299de46 sys/src/lib.rs
63
+ 9928ad551b89bc77ae88c88443ed38ecc7790a9741890a9927153b94c22d099e sys/src/lint_probe.rs
64
+ 6f0d225af05d98b65efa273ed0eb5b40cb001a816f7eea0d3631d1197801f4a9 sys/src/no_unwind.rs
65
+ 5ae1e0d33883f57b85fbb6ec080ff43e64b7219b6770814b6517cb53616a92aa sys/src/non_raising.rs
66
+ a840227137992b7bbb5f2514775f7d0356b71dc958db59bc60e326f9e7a11267 sys/src/protect.rs
67
+ 1089595250c250d0ea834213f8a51e84f9f3f2a4b55a4d07988c01e559e31e66 sys/src/raising.rs
68
+ 3be7e3c8a0980f7bf5935ba9b7432e5d985a2318f2a9d2aee007fec1bef96d48 sys/src/value.rs
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lexer_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takahashim
@@ -23,6 +23,26 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rb_sys
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.9'
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 0.9.130
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.9'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.130
26
46
  description: LexerKit is a high performance lexer toolkit for Ruby
27
47
  email:
28
48
  - takahashimm@gmail.com
@@ -32,20 +52,25 @@ extensions:
32
52
  - ext/lexer_kit_rust/extconf.rb
33
53
  extra_rdoc_files: []
34
54
  files:
55
+ - Cargo.lock
56
+ - Cargo.toml
35
57
  - LICENSE.txt
36
58
  - README.md
59
+ - crates/lexer_kit_core/Cargo.toml
60
+ - crates/lexer_kit_core/src/dfa.rs
61
+ - crates/lexer_kit_core/src/format.rs
62
+ - crates/lexer_kit_core/src/lib.rs
63
+ - crates/lexer_kit_core/src/opcodes.rs
64
+ - crates/lexer_kit_core/src/safety_test.rs
65
+ - crates/lexer_kit_core/src/token_buffer.rs
66
+ - crates/lexer_kit_core/src/trie.rs
67
+ - crates/lexer_kit_core/src/types.rs
68
+ - crates/lexer_kit_core/src/vm.rs
37
69
  - exe/lexer_kit
38
70
  - ext/lexer_kit_rust/Cargo.toml
39
71
  - ext/lexer_kit_rust/extconf.rb
40
- - ext/lexer_kit_rust/src/deserializer.rs
41
- - ext/lexer_kit_rust/src/dfa.rs
42
72
  - ext/lexer_kit_rust/src/fast_stream.rs
43
73
  - ext/lexer_kit_rust/src/lib.rs
44
- - ext/lexer_kit_rust/src/opcodes.rs
45
- - ext/lexer_kit_rust/src/safety_test.rs
46
- - ext/lexer_kit_rust/src/trie.rs
47
- - ext/lexer_kit_rust/src/types.rs
48
- - ext/lexer_kit_rust/src/vm.rs
49
74
  - lib/lexer_kit.rb
50
75
  - lib/lexer_kit/builder.rb
51
76
  - lib/lexer_kit/builder/compiler.rb
@@ -86,14 +111,83 @@ files:
86
111
  - lib/lexer_kit/ir/instruction.rb
87
112
  - lib/lexer_kit/ir/jump_table.rb
88
113
  - lib/lexer_kit/ir/keyword_table.rb
114
+ - lib/lexer_kit/ir/limits.rb
89
115
  - lib/lexer_kit/ir/opcode.rb
90
116
  - lib/lexer_kit/ir/serializer.rb
91
117
  - lib/lexer_kit/runner.rb
92
118
  - lib/lexer_kit/trie.rb
93
119
  - lib/lexer_kit/version.rb
120
+ - vendor/nupur.sha256
121
+ - vendor/nupur/Cargo.toml
122
+ - vendor/nupur/LICENSE
123
+ - vendor/nupur/NOTICE
124
+ - vendor/nupur/README.ja.md
125
+ - vendor/nupur/README.md
126
+ - vendor/nupur/src/abi.rs
127
+ - vendor/nupur/src/args.rs
128
+ - vendor/nupur/src/build.rs
129
+ - vendor/nupur/src/caught.rs
130
+ - vendor/nupur/src/cname.rs
131
+ - vendor/nupur/src/describe.rs
132
+ - vendor/nupur/src/encoding.rs
133
+ - vendor/nupur/src/gvl.rs
134
+ - vendor/nupur/src/hash.rs
135
+ - vendor/nupur/src/inject.rs
136
+ - vendor/nupur/src/lib.rs
137
+ - vendor/nupur/src/lint_probe.rs
138
+ - vendor/nupur/src/msg.rs
139
+ - vendor/nupur/src/no_unwind.rs
140
+ - vendor/nupur/src/raw/check.rs
141
+ - vendor/nupur/src/raw/data.rs
142
+ - vendor/nupur/src/raw/define.rs
143
+ - vendor/nupur/src/raw/exception.rs
144
+ - vendor/nupur/src/raw/iterate.rs
145
+ - vendor/nupur/src/raw/mod.rs
146
+ - vendor/nupur/src/raw/protect.rs
147
+ - vendor/nupur/src/raw/string.rs
148
+ - vendor/nupur/src/raw/symbol.rs
149
+ - vendor/nupur/src/raw/values.rs
150
+ - vendor/nupur/src/rb/call.rs
151
+ - vendor/nupur/src/rb/class.rs
152
+ - vendor/nupur/src/rb/convert.rs
153
+ - vendor/nupur/src/rb/error.rs
154
+ - vendor/nupur/src/rb/global.rs
155
+ - vendor/nupur/src/rb/kept.rs
156
+ - vendor/nupur/src/rb/method.rs
157
+ - vendor/nupur/src/rb/method/frame.rs
158
+ - vendor/nupur/src/rb/mod.rs
159
+ - vendor/nupur/src/rb/object.rs
160
+ - vendor/nupur/src/rb/ruby.rs
161
+ - vendor/nupur/src/rb/value.rs
162
+ - vendor/nupur/src/rb/value/header.rs
163
+ - vendor/nupur/src/rb/value/id.rs
164
+ - vendor/nupur/src/rb/value/integer.rs
165
+ - vendor/nupur/src/stack.rs
166
+ - vendor/nupur/src/string/make.rs
167
+ - vendor/nupur/src/string/mod.rs
168
+ - vendor/nupur/src/string/read.rs
169
+ - vendor/nupur/src/table.rs
170
+ - vendor/nupur/src/typed/callbacks.rs
171
+ - vendor/nupur/src/typed/data_type.rs
172
+ - vendor/nupur/src/typed/embedded.rs
173
+ - vendor/nupur/src/typed/external.rs
174
+ - vendor/nupur/src/typed/hidden.rs
175
+ - vendor/nupur/src/typed/mod.rs
176
+ - vendor/nupur/src/utf8_copy.rs
177
+ - vendor/nupur/sys/Cargo.toml
178
+ - vendor/nupur/sys/src/data_type.rs
179
+ - vendor/nupur/sys/src/int.rs
180
+ - vendor/nupur/sys/src/lib.rs
181
+ - vendor/nupur/sys/src/lint_probe.rs
182
+ - vendor/nupur/sys/src/no_unwind.rs
183
+ - vendor/nupur/sys/src/non_raising.rs
184
+ - vendor/nupur/sys/src/protect.rs
185
+ - vendor/nupur/sys/src/raising.rs
186
+ - vendor/nupur/sys/src/value.rs
94
187
  homepage: https://github.com/takahashim/lexer_kit
95
188
  licenses:
96
189
  - MIT
190
+ - Apache-2.0
97
191
  metadata:
98
192
  homepage_uri: https://github.com/takahashim/lexer_kit
99
193
  source_code_uri: https://github.com/takahashim/lexer_kit