From 65bae1869f1451253276e51fea5b808b38685bf9 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Mon, 24 Jan 2022 01:19:26 +0000 Subject: Prepare for Dops later --- operators.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'operators.c') diff --git a/operators.c b/operators.c index 05eed7d..c46e627 100644 --- a/operators.c +++ b/operators.c @@ -4,8 +4,8 @@ #include "apl9.h" -Rune primmonopnames[] = L"¨⍨⌸⌶&"; -Rune primdyadopnames[] = L"⍣.∘⍤⍥@⍠⌺"; +Rune primmonopnames[] = L"¨⍨⌸⌶&∆"; +Rune primdyadopnames[] = L"⍣.∘⍤⍥@⍠⌺⍙"; opmonad monadoperatordefs[] = { opEach, /* ¨ */ @@ -13,6 +13,7 @@ opmonad monadoperatordefs[] = { 0, /* ⌸ */ 0, /* ⌶ */ 0, /* & */ + opSelfReference1, /* ∆ */ }; opdyad dyadoperatordefs[] = { @@ -24,6 +25,7 @@ opdyad dyadoperatordefs[] = { 0, /* @ */ 0, /* ⍠ */ 0, /* ⌺ */ + opSelfReference2, /* ⍙ */ }; /* Monadic operators */ @@ -74,6 +76,13 @@ opSwitch(Datum *lefto, Array *left, Array *right) return nil; } +Array * +opSelfReference1(Datum *lefto, Array *left, Array *right) +{ + throwerror(L"∆", ESyntax); + return nil; +} + /* Dyadic operators */ Array * opBind(Datum *lefto, Datum *righto, Array *left, Array *right) @@ -160,4 +169,11 @@ opOver(Datum *lefto, Datum *righto, Array *left, Array *right) freearray(tmp); return res; } +} + +Array * +opSelfReference2(Datum *lefto, Datum *righto, Array *left, Array *right) +{ + throwerror(L"⍙", ESyntax); + return nil; } \ No newline at end of file -- cgit v1.2.3