#! ./spec/dzref nl‿tab←•UCS 10‿9 charSet←∾charGroups←⟨ chF←"+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔" # Function "˜˘¨⌜⁼´`" # Modifier "∘○⊸⟜⌾⊘◶⎉⚇⍟" # Composition ¯1⊏˘10‿2⥊"𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾𝕤𝕊" # Input (𝕣 pending; ℝ not allowed) nl∾"⋄," # Separator "←↩→" # Gets "(){}⟨⟩" # Bracket "‿" # Ligature •d # +⟜(↕10)⌾•UCS'0' # Digit "¯.π∞" # Numeric "_"∾' '(⊢∾+)⌾•UCS•a # Alphabetic 1↑"𝕨" # Prefix for input (hack around UTF-16) " "∾tab # Whitespace # #'" eliminated during tokenization ⟩ bF‿bM‿bC‿bI‿bS‿bG‿bB‿bL‿bD‿bN‿bA‿bP‿bW←⊔/≠¨charGroups vi←+´≠¨8↑charGroups Tokenize←{ r←𝕩='#'⋄s←/(≠↑2⊸↓)⊸∧𝕩=⊑"'"⋄d←/𝕩='"' g←⍋q←∾⟨ s⋄¯1↓d⋄/r⟩ ⋄q↩g⊏q e← g⊏∾⟨2+s⋄ 1↓d⋄(⊢-¯1↓0∾⊢)∘⊏⟜(0∾+`r)⊸//(𝕩=nl)∾1⟩ Se←{(⊏˜𝕨)Se 1¨⌾((𝕩/𝕨)⊸⊏)𝕩}⍟{0=⊑⌽𝕩} st←¯1↓Se⟜(1↑˜≠)∾⟜≠q⊸⍋¨e⋄b←st/q∾˘e ToI←¯1↓·/⁼(≠𝕩)∾˜⥊⋄f←¬≠`ToI b cb←(¬(st/q)⊏r)/b nl←≠lu←⍷lit←𝕩⊔˜1-˜(+`ToI⊑˘cb)×≠`ToI cb cl←f/ToI⊑∘⌽˘cb args←charSet⊸⊐¨𝕨⋄c←charSet⊐f/𝕩 w←(≠↑0∾⊢)⊸,≠,=,≤,≥,≡,≢,⊣,⊢,⥊,∾,≍,↑,↓,↕,⌽,⍉,/,⍋,⍒,⊏,⊑,⊐,⊒,∊,⍷,⊔ ˜,˘,¨,⌜,⁼,´,` ∘,○,⊸,⟜,⌾,⊘,◶,⎉,⚇,⍟ ⟩ DGenFn←{ ⟨t,nVar,nLoc,lits⟩←⟨⟩Tokenize𝕩 ⟨bc,u⟩←nVar DParse t o←(u-(vi+nVar-≠prims)×u≥vi)⊏prims∾ReadNum¨lits ⟨bc,o,nVar↑•a,⟨⟩⟩ } DRun←{ ('f'‿0 •COMP DGenFn 𝕩){𝔽} 0 }