blob: cb60b7df1da213c7b821f5a7969a0eac16a25878 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#! /usr/bin/env dbqn
compile ← ⟨•path∾"../c.bqn"⋄"DGenFn"⟩ •EX •path∾"../dzref"
Symcomp ← ((<"runtime["∾⍕∾"]"˜)¨↕59)⊸Compile
FP ← ∞⊸=◶⟨⍕,"Infinity"⟩
Str ← "str("""∾∾⟜""")"
Char ← "'"(∾∾⊣)(⟨"\t","\n","\'"⟩∾<)⊑˜("'"∾˜•UCS 9‿10)⊑∘⊐⊢
Fmt ← ≡◶⟨(⊑⍋)∘(∾⟜∞)◶⟨0⊸≤◶⟨"-"∾FP∘|,FP⟩,Char⟩⋄Str⋄⊑⟩
L ← "["∾"]"∾˜1↓·∾","⊸∾⟜⍕¨
G ← ⟨L∾⟜25,L Fmt¨,L⟨⊑"fmd"⊸⊐,⊢,⊢,≠⟩⊸(L{𝕎𝕩}¨)¨⟩ {𝕎𝕩}¨ 0‿1‿3 ⊏ Symcomp
Gen ← L G
GenLong ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((•UCS 10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ G
• ← ∾∾⟜(•UCS 10)¨ Gen¨ •args
#• ← GenLong •EX •path∾"pr.bqn"
#• ← GenLong ∾∾⟜(•UCS 10)¨ (•LNS •path∾"c.bqn")∾<"Compile"
|