To avoid breaking existing code that uses {{. .

Henry Rich

On 11/4/2020 11:07 AM, Raul Miller wrote:
Oh, yes.. hmm...

Looking at what I tested, I see that I messed up that test. (For some
reason, I just tested the ;: monad there.)

That said... remind me again why the {{ and }} rules do not follow the
same pattern as any other tokenization when dealing with . and :
characters?

Thanks,

--
Raul


On Wed, Nov 4, 2020 at 10:52 AM Henry Rich <[email protected]> wrote:
     (0;sj;mj)&;: '{{.'
+---+
|{{.|
+---+
     ;: '{{.'
+-+--+
|{|{.|
+-+--+
     (0;sj;mj)&;: 'NB. comment' , 10 48 10 { a.
+--------------+
|NB. comment 0 |
+--------------+
     ;: 'NB. comment' , 10 48 10 { a.
+-----------+-+-+-+
|NB. comment| |0| |
+-----------+-+-+-+

Henry Rich

On 11/4/2020 10:27 AM, Raul Miller wrote:
This needs more extensive testing, but I believe that I have an
updated mj and sj for
https://www.jsoftware.com/help/dictionary/d332.htm which delivers the
new behavior for the ;: monad with (0;sj;mj)&;:

(beware email induced line wrap).

mj=: 256$0                     NB. X other
mj=: 1 (9,a.i.' ')}mj          NB. S space and tab
mj=: 2 (,(a.i.'Aa')+/i.26)}mj  NB. A A-Z a-z excluding N B
mj=: 3 (a.i.'N')}mj            NB. N the letter N
mj=: 4 (a.i.'B')}mj            NB. B the letter B
mj=: 5 (a.i.'0123456789_')}mj  NB. 9 digits and _
mj=: 6 (a.i.'.')}mj            NB. D .
mj=: 7 (a.i.':')}mj            NB. C :
mj=: 8 (a.i.'''')}mj           NB. Q quote
mj=: 9 (a.i.'{')}mj            NB. {
mj=:10 (a.i.'}')}mj            NB. }

sj=: _2]\"1 }.".;._2 (0 : 0)
' X    S    A    N    B    9    D    C    Q     {      } ']0
   1 1  0 0  2 1  3 1  2 1  6 1  1 1  1 1  7 1  10 1  11 1  NB.  0 space
   1 2  0 3  2 2  3 2  2 2  6 2  1 0  1 0  7 2  10 2  11 2  NB.  1 other
   1 2  0 3  2 0  2 0  2 0  2 0  1 0  1 0  7 2  10 2  11 2  NB.  2 alp/num
   1 2  0 3  2 0  2 0  4 0  2 0  1 0  1 0  7 2  10 2  11 2  NB.  3 N
   1 2  0 3  2 0  2 0  2 0  2 0  5 0  1 0  7 2  10 2  11 2  NB.  4 NB
   9 0  9 0  9 0  9 0  9 0  9 0  1 0  1 0  9 0   9 0   9 0  NB.  5 NB.
   1 4  0 5  6 0  6 0  6 0  6 0  6 0  1 0  7 4  10 4  11 4  NB.  6 num
   7 0  7 0  7 0  7 0  7 0  7 0  7 0  7 0  8 0   7 0   7 0  NB.  7 '
   1 2  0 3  2 2  3 2  2 2  6 2  1 2  1 2  7 0  10 2  11 2  NB.  8 ''
   9 0  9 0  9 0  9 0  9 0  9 0  9 0  9 0  9 0   9 0   9 0  NB.  9 comment
   1 2  0 3  2 2  3 2  2 2  6 2  1 0  1 0  7 2   1 0   1 2  NB. 10 {
   1 2  0 3  2 2  3 2  2 2  6 2  1 0  1 0  7 2   1 2   1 0  NB. 11 }
)

Thanks,


--
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to