Newsgroups:   comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!itcyyz!yrloc!intern
From:         mgf@ipsaint.ipsa.reuter.COM (Gfeller, Martin (zurich K6,network Prod))
Subject:      APL Transliterations (and parsing)
Message-ID: <1992Mar24.221746.28805@yrloc.ipsa.reuter.COM>
Sender: intern@yrloc.ipsa.reuter.COM (Intern via QUADRAM)
Reply-To:     mgf@ipsaint.ipsa.reuter.COM (Gfeller, Martin (zurich K6,network Prod))
Organization: Reuters Information Services (Canada)
Date:         24 Mar 92 22:00:05 UT


-----------Message forwarded from IPSA Mailbox-------------


no. 6088898 filed 21.21.44  tue 24 mar 1992
from mgf
to   uclapl
subj APL Transliterations (and parsing)
ref  Message-ID: <1992Mar23.151511.27848@cshl.org>

> Suppose function F has a local variable X and calls G, which has a free
> variable X, not assigned-to in G.  The interpretation of "X up-arrow Y" in G
> should not depend on the global definition of X.  (In APL2 monadic up-arrow
> is "first".)  How does one parse or transliterate G without knowing F calls G?

Restricting all functions to a fixed valence won't cure all parsing problems,
because of operators. Consider: f g A, where A is an array. This can be parsed
as

    monadic-function monadic-operator array

or  monadic-function monadic-function array

even if f and g are know to be monadic. Making all functions and operators
dyadic would help though.

(A cure for this is described in my paper "Operators considered harmful",
APL Quote Quad, Vol. 17, No. 1 and in my APL'88 paper "A framework for
extensions of APL". (However, that solution is not compatible with APL,
(and looks Lispy))).

/Martin

-------------------------------------------------------------------------
Martin Gfeller, Reuters Network Products
Kleinstrasse 6, CH-8008 Zurich, Switzerland; mgf@ipsaint.ipsa.Reuter.COM;
Phone [+41 1] 251 23 00; Fax [+41 1] 262 17 92
-------------------------------------------------------------------------

-----------------------------------------------------------
This posting is forwarded from an internal Reuters mailbox.
No statement or opinion contained herein should be taken as
being Reuters policy, or even as being approved by Reuters,
in any way.
