parsanol 1.3.63 → 1.3.64
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/version.rb +1 -1
- data/lib/parsanol/vm.rb +9 -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: 3d3b9a74be500e1e1874c246d72614966e39ee7766731726a23d77e7b88b8f33
|
|
4
|
+
data.tar.gz: 79d0492db122146e4bfca2ce17de4017b02d94385f8b9f6db540e7ea69ee6d02
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7cf8b9f912837052ab62bcf35332de5b4715f0a9f43e8b9ffc8e5cb3cf5ce16a0d830c0841ad326855cad5eb8c8de8e3e9e28cdbf264f441fd40db71f78bef5
|
|
7
|
+
data.tar.gz: 00755e792eb152ced1b9d3e38f783d1f9637cc13add763b609e8e4edaaff1dd4dafa426bf162e11e956bad14d86ad75b6eb07bd42d0015f32f48e043e72e594c
|
data/lib/parsanol/version.rb
CHANGED
data/lib/parsanol/vm.rb
CHANGED
|
@@ -536,11 +536,19 @@ module Parsanol
|
|
|
536
536
|
if tables.all? && pairwise_disjoint?(tables)
|
|
537
537
|
dispatch_idx = emit(BYTE_DISPATCH, nil, nil, nil)
|
|
538
538
|
starts = []
|
|
539
|
+
# A dispatched branch that matched must not fall through into
|
|
540
|
+
# the next branch's code: the tables are lead-byte disjoint,
|
|
541
|
+
# but the remaining input can still satisfy a later branch's
|
|
542
|
+
# terminals (pubid: " - " — the '-' branch ran the ' ' branch's
|
|
543
|
+
# STR on the byte after the dash). Jump every branch but the
|
|
544
|
+
# last past the dispatch.
|
|
545
|
+
jumps = []
|
|
539
546
|
idx = 0
|
|
540
547
|
while idx < count
|
|
541
548
|
starts << flat(@ops.size)
|
|
542
549
|
return nil unless compile_atom(alts[idx], consume_all)
|
|
543
550
|
|
|
551
|
+
jumps << emit(JMP, nil, nil, nil) unless idx == count - 1
|
|
544
552
|
idx += 1
|
|
545
553
|
end
|
|
546
554
|
table = Array.new(256, -1)
|
|
@@ -555,6 +563,7 @@ module Parsanol
|
|
|
555
563
|
bi2
|
|
556
564
|
end
|
|
557
565
|
patch(dispatch_idx, 1, table)
|
|
566
|
+
jumps.each { |j| patch(j, 1, flat(@ops.size)) }
|
|
558
567
|
return self
|
|
559
568
|
end
|
|
560
569
|
|