From 15e7009214db9a6e5d2a7bf121cdce57b0710b46 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 11 Jun 2020 16:45:41 -0400 Subject: Add variables for the whole character set to c.bqn --- c.bqn | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/c.bqn b/c.bqn index 66edc3ca..b7a26d67 100755 --- a/c.bqn +++ b/c.bqn @@ -2,13 +2,29 @@ ⊔↩((↕1+(>⌈´))=¨<)∘⊣ /¨⟜< ↕∘≠⍠⊢ +lf‿tab←•UCS 10‿9 +chR←"⍝" ⍝ Remark +chD←•d ⍝ +⟜(↕10)⌾•UCS'0' ⍝ Digit +chN←"¯.π∞" ⍝ Numeric +chA←' '(⊢∾+)⌾•UCS•a ⍝ Alphabetic +chU←"_" ⍝ Underscore +chF←"+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔" ⍝ Function +chM←"˜˘¨⌜⁼´`" ⍝ Modifier +chC←"∘○⊸⟜⌾⎉⚇⍟" ⍝ Composition +chP←"𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾" ⍝ Parameter +chW←" "∾tab ⍝ Whitespace +chS←"⋄,"∾lf ⍝ Separator +chG←"←↩→" ⍝ Gets +chB←"(){}⟨⟩" ⍝ Bracket +chL←"‿" ⍝ Ligature +chQ←"'""" ⍝ Quote + Parse←{ ⟨⟩Parse𝕩;args←𝕨⋄x←𝕩 - lf‿tab←•UCS 10‿9 - x(/˜)↩¬(x∊' '∾tab)∨<○(⌈`↕∘≠⊸×)´(lf∾'⍝')=⌜x - seps←"⋄,"∾lf⋄x(/˜)↩¬(1⌾⊑1⌽1⌾⊑)⊸∧x∊seps + x(/˜)↩¬(x∊chW)∨<○(⌈`↕∘≠⊸×)´(lf∾chR)=⌜x + x(/˜)↩¬(1⌾⊑1⌽1⌾⊑)⊸∧x∊chS a←x∊"←↩"⋄at←1⌽a⋄vars←at/x⋄x(/˜)↩¬a⋄a(/˜)↩¬at - l←≠x⋄sep←x∊seps⋄x↩'⋄'¨⌾(sep⊸/)x + l←≠x⋄sep←x∊chS⋄x↩'⋄'¨⌾(sep⊸/)x o←x='('⋄c←x=')'⋄v←a-˜x∊•d∾args∾vars⋄f←¬o∨c∨v∨sep na←(2×sep)+f×1+l↑0∾c∨v e←/c⋄d←+`o-c -- cgit v1.2.3