bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] using XFRPC11.w3


From: Juergen Sauermann
Subject: Re: [Bug-apl] using XFRPC11.w3
Date: Mon, 27 Apr 2015 14:49:16 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Fausto,

everything is fine, except that you need to manually modify the functions that were mentioned
in the warnings. What happened is this:

GNU APL reads an .atf file. The .atf file contains APL code that (tries to) reconstructs the variables and functions
of the workspace that was written into the .atf file. The APL code that constructs functions usually has the form:

   ⎕FX 'fun-header' 'fun-line-1' 'fun-line-2' ...

Now it is possible that the ⎕FX fails. In the .atf file that we are talking about there were two types of
failures: 3 illegal tokens in function
∆xfrfrom and an illegal character in function ∆Oins. Illegal
characters are detected by the APL tokenizer while illegal tokens have passed the tokenizer but
were detected by the APL parser. Both failures generate a SYNTAX ERROR warning, but only when
reading an .atf file. The bad character in your .atf file was ⎕AV[⎕IO + 161] or Unicode U+00BD. It looks
a bit like '1/2' but has no APL2 significance (though it may have significance in other interpreters).

When GNU APL reads an .atf file with errors like the above then it prefixes the offending line(s) with ##
and prints the warning mentioning the function name containing the line. You are then supposed to fix the
errors manually (removing the ## and replacing the rest by some correct code. If you display such a function
(which actually opens, displays, and closes it) then you get a DEFN ERROR+ (where the + tells you that
command )MORE has more info about the error. In your case the not-removed ## in line [3] of function
∆Oins was raising the DEFN ERROR.

/// Jürgen


On 04/27/2015 07:53 AM, Fausto Saporito wrote:
Hi Jürgen,

I tried the SVN 616, and I have this when I try to load the workspace.
There are some warnings from the "tolerant" parser :) but I don't know
if they are ok, because I have a DEFN ERROR and also an unknown symbol
(!)

      )in xfrpcv5.atf

Warning: SYNTAX ERROR in function ∆xfrfrom

Warning: SYNTAX ERROR in function ∆xfrfrom

Warning: SYNTAX ERROR in function ∆xfrfrom

Unknown APL character: ½ (U+00BD)

Warning: SYNTAX ERROR in function ∆Oins

      ∇∆Oins[⎕]∇

    ∇

[0]   r←p1 ∆Oins p2;∆Oins;n1;n2;s1;s2

[1]  ⍝ danb insert overlay on the right into the one on the left

[2]   s1←⍴n1←3 ⎕ov p1 ◊ s2←⍴n2←3 ⎕ov p2 ◊ r←0,1↓s1⌈s2

[3]  ## n1←(s1⌈r)↑n1 ◊ n2←(s2⌈r)↑n2 ◊ r←n2½n1←(∼∨/n1∧.=⍉n2)⌿n1

[4]  ⍝ names normalized, build the local fn

[5]   r←'r_9←0 ⎕ov ',(⍕⍴r),1⌽'''⍴''',,r

[6]   r←⎕fx('r_9←a_9 ∆Oins b_9',(,';',n1),,';',n2)'r_9←2 ⎕ov a_9◊r←2⎕ov b_9' r

[7]   r←p1 ∆Oins p2

    ∇

DEFN ERROR+

      ∇∆Oins[⎕]∇

               ^
regards,
Fausto


2015-04-25 17:23 GMT+02:00 Juergen Sauermann <address@hidden>:
Hi Fausto,

I have made the )IN Command more tolerant. It now accepts
some common SYNTAX ERRORs that are mainly caused by some
non-standard APL extensions like :try.

SVN 614.

/// Jürgen

    


reply via email to

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