Oh, oops, I should have spotted that. Thanks.

Updated state table:

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. . the decimal point
mj=: 7 (a.i.':')}mj            NB. : the colon
mj=: 8 (a.i.'''')}mj           NB. Q quote
mj=: 9 (a.i.'{')}mj            NB. { the left curly brace
mj=:10 (10)} mj                NB. LF
mj=:11 (a.i.'}')}mj            NB. } the right curly brace

sj=: 0 10#:10*}.".;._2(0 :0)
' X   S   A   N   B   9   .   :   Q    {    LF   }']0
 1.1 0.0 2.1 3.1 2.1 6.1 1.1 1.1 7.1 11.1 10.1 12.1 NB. 0 space
 1.2 0.3 2.2 3.2 2.2 6.2 1.0 1.0 7.2 11.2 10.2 12.2 NB. 1 other
 1.2 0.3 2.0 2.0 2.0 2.0 1.0 1.0 7.2 11.2 10.2 12.2 NB. 2 alp/num
 1.2 0.3 2.0 2.0 4.0 2.0 1.0 1.0 7.2 11.2 10.2 12.2 NB. 3 N
 1.2 0.3 2.0 2.0 2.0 2.0 5.0 1.0 7.2 11.2 10.2 12.2 NB. 4 NB
 9.0 9.0 9.0 9.0 9.0 9.0 1.0 1.0 9.0  9.0 10.2  9.0 NB. 5 NB.
 1.4 0.5 6.0 6.0 6.0 6.0 6.0 1.0 7.4 11.4 10.2 12.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  7.0 NB. 7 '
 1.2 0.3 2.2 3.2 2.2 6.2 1.2 1.2 7.0 11.2 10.2 12.2 NB. 8 ''
 9.0 9.0 9.0 9.0 9.0 9.0 9.0 9.0 9.0  9.0 10.2  9.0 NB. 9 comment
 1.2 0.2 2.2 3.2 2.2 6.2 1.2 1.2 7.2 11.2 10.2 12.2 NB. 10 LF
 1.2 0.3 2.2 3.2 2.2 6.2 1.0 1.0 7.2 13.0 10.2  1.2 NB. 11 {
 1.2 0.3 2.2 3.2 2.2 6.2 1.0 1.0 7.2  1.2 10.2 14.0 NB. 12 }
 1.2 0.3 2.2 3.2 2.2 6.2 1.7 1.7 7.2  1.2 10.2  1.2 NB. 13 {{
 1.2 0.3 2.2 3.2 2.2 6.2 1.7 1.7 7.2  1.2 10.2  1.2 NB. 14 }}
)

(Note that I haven't coerced this state table to integer form --
floats and integers occupy the same space on 64 bit systems, and the
model doesn't really care about representation.)

Thanks,

-- 
Raul

On Sun, Nov 8, 2020 at 10:53 AM Henry Rich <[email protected]> wrote:
>
> I was talking about
>
>     ;: LF,'.'
> +-+-+
> | |.|
> +-+-+
>
> Henry Rich
>
> On 11/8/2020 8:38 AM, Raul Miller wrote:
> > I tested for that case:
> >
> >     #;:'NB.',LF,LF
> > 3
> >    #(0;sj;mj) sq 'NB.',LF,LF
> > 3
> >     #(0;sj;mj) sq 'NB.',LF,LF,LF
> > 4
> >
> > 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

Reply via email to