diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-06-07 17:03:00 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-06-07 17:03:00 -0400 |
| commit | a3366e9228504eb372680c3e384df1809e03f0a1 (patch) | |
| tree | e51a5693f1c7b7de1de8faf68e027750a359ec07 | |
| parent | ce9113e29e62d8a221e5ed303fa2a1df117bbf90 (diff) | |
Ignore initial/repeated/ending separators
| -rwxr-xr-x | c.bqn | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,8 +1,9 @@ #!/usr/bin/env bqn Parse←{ ⟨⟩Parse𝕩;args←𝕨⋄x←𝕩 - a←x='←'⋄at←1⌽a⋄vars←at/x⋄x(/˜)↩¬a⋄a(/˜)↩¬at - l←≠x⋄o←x='('⋄c←x=')'⋄sep←x='⋄'⋄v←a-˜x∊•d∾args∾vars⋄f←¬o∨c∨v∨sep + seps←"⋄,"∾•UCS 10⋄x(/˜)↩¬(1⌾⊑1⌽1⌾⊑)⊸∧x∊seps + a←x∊"←↩"⋄at←1⌽a⋄vars←at/x⋄x(/˜)↩¬a⋄a(/˜)↩¬at + l←≠x⋄o←x='('⋄c←x=')'⋄sep←x∊seps⋄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 ed←e⊏d⋄b←(⍋⍋ed)⊏(⍋⊏⟜d)⊸⊏/o |
