aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdc.bqn13
1 files changed, 2 insertions, 11 deletions
diff --git a/dc.bqn b/dc.bqn
index fb9399ac..ad0b4235 100755
--- a/dc.bqn
+++ b/dc.bqn
@@ -11,23 +11,14 @@ prims ← (•Import "dzref"){𝔽} "⟨
∘,○,⊸,⟜,⌾,⊘,◶,⎉,⚇,⍟
⟩"
-LEB←{
- b←128
- s←+`»i←1+l←⌊b⋆⁼1⌈𝕩
- o←⍋⍋↕∘≠⊸-i/s
- v←o⊏l{f←×𝕨⋄(𝕨-1)(b⊸(×⟜f+|)∾𝕊⟜(⌊÷⟜b)○(f⊸/))⍟(∨´f)𝕩}𝕩
- v‿s‿i
-}
-
special←<˘∘‿2⥊"𝕤𝕩𝕨𝕣𝕗𝕘"
DCompile⇐{
⟨bc,o,fblk,ind⟩ ← 4 ↑ prims Compile 𝕩
- bcl‿el‿ol←LEB bc
blk‿bdy ← <˘⍉>(↕≠fblk){
⟨t,i,l,n⟩←𝕩
s←(3×i)↓(t⊑3‿5‿6)↑special
- ⟨⟨t,i,𝕨,𝕨⟩ ⋄ ⟨l⊑el, s∾⥊¨'a'+↕n-≠s⟩⟩
+ ⟨⟨t,i,𝕨,𝕨⟩ ⋄ ⟨l, s∾⥊¨'a'+↕n-≠s⟩⟩
}¨fblk
- ⟨bcl,o,blk,⊑blk,bdy,ol/⊑ind,ol/1⊑ind,𝕩⟩
+ ⟨bc,o,blk,⊑blk,bdy,⊑ind,1⊑ind,𝕩⟩
}
DRun⇐•COMP∘DCompile