From d48d315a184d3d7110eebb24dc886b86d7d0e00f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 3 Sep 2020 12:36:05 -0400 Subject: Use affine characters to make alphabet and digits in the compiler --- src/c.bqn | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/c.bqn b/src/c.bqn index 56020480..0b012b72 100644 --- a/src/c.bqn +++ b/src/c.bqn @@ -2,9 +2,6 @@ tab←' '⋄nl←' ' -dig ← "0123456789" -alph ← "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -alow ← "abcdefghijklmnopqrstuvwxyz" charSet←∾charGroups←⟨ chF←"+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" # Function "˙˜˘¨⌜⁼´˝`" # Modifier @@ -15,9 +12,9 @@ charSet←∾charGroups←⟨ "‿" # Ligature "·" # nOthing "𝕊𝕏𝕎𝔽𝔾𝕤𝕩𝕨𝕗𝕘" # Input (𝕣 pending; ℝ not allowed) - dig # Digit + '0'+↕10 # Digit "¯.π∞" # Numeric - alow∾alph∾"_" # Alphabetic + "_"∾˜⥊"aA"+⌜↕na←26 # Alphabetic " "∾tab # Whitespace # #'" eliminated during tokenization ⟩ @@ -50,7 +47,7 @@ Tokenize←{ c←cl-˜CharCode(⊑charSet)¨⌾(cl⊸/)f/𝕩 w←(≠↑0∾⊢)⊸iu/ti -- cgit v1.2.3