diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-16 22:57:56 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-17 10:31:56 -0400 |
| commit | 6f2d2e6c57d24fc4445d0feb6233aa37f614e8b7 (patch) | |
| tree | 6f39c1c1f1533bc48f19f0303a1b75142c429d11 /wc.bqn | |
| parent | 8013cfa27c143e2a9abe6fe6f24e00d92396886d (diff) | |
Handle all deduplication together; move number evaluation into the tokenizer
Diffstat (limited to 'wc.bqn')
| -rw-r--r-- | wc.bqn | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2,8 +2,8 @@ # WebAssembly backend (very incomplete) -i←"⟨cgl,charSet,Tokenize,ReadNum⟩" -⟨cgl,charSet,Tokenize,ReadNum⟩ ← ⟨•path∾"src/c.bqn",i⟩ •EX •path∾"dzref" +i←"⟨cgl,charSet,Tokenize⟩" +⟨cgl,charSet,Tokenize⟩ ← ⟨•path∾"src/c.bqn",i⟩ •EX •path∾"dzref" chF←(⊑cgl)↑charSet bF‿bM‿bC‿bS‿bG‿bB‿bL‿bO‿bI‿bU‿bD‿bN‿bA‿bW←≍¨˜⟜(+`≠↑0∾⊢)cgl M←1⊸⊑(0⊸≤∧>)-⟜⊑ @@ -47,7 +47,7 @@ fntab←⍉(0¨tab1)∾tab1≍tab2 f64←127-3 GenFn←{ - ⟨t,r,nVar,lits,strs⟩←Tokenize𝕩 + ⟨t,r,nVar,lits⟩←Tokenize𝕩 nLoc←nVar-𝕨⊢0 t⊏˜↩⍋+`-˝(2‿3+⊑bB)=⌜t nd←+´c←t=3+⊑bB @@ -56,7 +56,7 @@ GenFn←{ ops←⥊∾⟨ ∾⟜(0⥊˜3∾˜vi-≠)fntab ⍉(Hex¨"20"‿"22"‿"21")∾⌜↕nVar - ⊣⌜⟜(↕3)(GenF64∘ReadNum¨lits)∾(Hex"10")∾¨3+↕nd + ⊣⌜⟜(↕3)(GenF64¨lits)∾(Hex"10")∾¨3+↕nd ⟩ (((≠∾∾)⟨nLoc∾f64⟩)∾(Hex"0B")∾˜∾)¨((⊢-˜¬×+`)a=2+⊑bB)⊔(na+3×a)⊏ops } |
