diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-29 18:08:24 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-29 18:08:24 -0400 |
| commit | 1461cb3b0dcf4991295ecffa7317ae0c4a7a909c (patch) | |
| tree | 7e04a6b27849fd5e56fbd259227157768d320ba2 /test | |
| parent | 48d8cc1401e46b8c33330f0f61fd36b40c20b789 (diff) | |
Don't include undefined built-in guards in preprocessing
Diffstat (limited to 'test')
| -rwxr-xr-x | test/cmpref.bqn | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/test/cmpref.bqn b/test/cmpref.bqn index 54b3eabd..fb02a664 100755 --- a/test/cmpref.bqn +++ b/test/cmpref.bqn @@ -19,25 +19,21 @@ init ← " "⊸∾¨(/⟜"_"¨nc/0‿1‿1)∾¨(nc/"FMD")∾¨(nc+´⊸↑⥊"A post ← ∾⟜" "¨/⟜"_"¨nc/0‿0‿1 names ← init∾¨(•UCS 48)∾¨post -Inc ← { +Inc ← { i←⊑chr⊐𝕩 n←0 ⋄ itr↩{n↩1+𝕩}⌾(i⊑⊢)itr names↩((i⊑init)∾(•UCS 48+n)∾i⊑post)⌾(i⊑⊢)names } -# starting built-ins -inps←⟨"𝕨 ","𝕨,𝕗","𝕨,𝕘"⟩ -pre ← names∾¨(nc/("←{⟨"∾∾⟜"⟩ ⋄ ≤""Using undefined built-in ")¨inps)∾¨∾⟜"""}"¨chr - # built-in assumptions -Mod ← {pre ∾↩ <((⊑chr⊐𝕨)⊑names) ∾ " ↩ " ∾ 𝕩} - -pre ∾↩ <"IsArray ← 0≠≡" -pre ∾↩ <"_amend ← {𝕨{𝕩⋄𝕗}⌾(𝕗⊑⊢)𝕩}" -pre ∾↩ <"Type ← ⟨⟩⥊0⊸⥊" - -'!' Mod "{𝕩 ⋄ ≤1}⍟¬" -Mod⟜⥊¨ "+-×÷⋆⌊=≤≢⥊⊑↕⌜⁼" +Mod ← {((⊑chr⊐𝕨)⊑names) ∾ " ← " ∾ 𝕩} + +pre ← ⟨ + "IsArray ← 0≠≡" + "_amend ← {𝕨{𝕩⋄𝕗}⌾(𝕗⊑⊢)𝕩}" + "Type ← ⟨⟩⥊0⊸⥊" + '!' Mod "{𝕩 ⋄ ≤1}⍟¬" +⟩∾Mod⟜⥊¨ "+-×÷⋆⌊=≤≢⥊⊑↕⌜⁼" # checks if line is a builtin redefinition |
