bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] A few problems


From: vvs
Subject: Re: [Bug-apl] A few problems
Date: Wed, 6 Feb 2019 18:11:16 +0200

On Wed, Feb 6, 2019 at 4:10 PM Dr. Jürgen Sauermann
<address@hidden> wrote:
> Certainly not:
>
> ∇Z←A
>  Z←42
>
>
> At this point A has token class Niladic-Defined-Function-Name (page 25), An 
> attempt to
> change that by:
>
> A←5
>
> is therefore explicitly forbidden by the statement on page 67. It has always 
> bin that way since
> the invention of APL. You need to )ERASE A (or → if A was localized) before 
> you can change it

I don't see any mention of this in ISO standard or any textbooks.
Where exactly is said that parsing should always use token class when
binding names? I'm again quoting ISO where it explicitly said that
tokens could change their class during parsing:

"Informal Description: Bind-token-class is used to bind each
identifier in current-
statement to its current syntactic-unit; if the class of a token
changes between this
point and the time the token is used (as it would for example in F
⎕EX'F' , assuming
F were initially a defined-function), the change will be detected and
reported as a
syntax-error in the appropriate phrase-evaluator."

I understand wordings in ISO such that as parsing should always be
done based on syntax alone and only evaluation of already parsed
expressions should consult their classes. In that context A is clearly
a variable-name and only during binding it should be signaled that
changing its class is a syntax-error. Otherwise evaluating
syntactically incorrect statements will surely lead to unpredictable
behavior.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]