kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

Stop does not work properly #564

Closed tavmem closed 4 years ago

tavmem commented 4 years ago
kona      \ for help. \\ to exit.

  \b s
  {a:x; a:5; \a:6; a:7; a}3
stop
{a:x; a:5; \a:6; a:7; a}3
>  a
value error
a
^
>  :
:
>  \
7
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.

  \b s
  {a:x; a:5; \a:6; a:7; a}3
stop
{a:x; a:5; \a:6; a:7; a}
           ^
>  a
6
>  :
7

  {a:x; a:5; \a:6; a:7; a}3
stop
{a:x; a:5; \a:6; a:7; a}
           ^
>  \
tavmem commented 4 years ago

This issue is related to issue #562:

K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems 
\ for help. \\ to exit.

  abc:111
  \b s
  {a:x; \a:6; 7}3
stop
{a:x; \a:6; 7}
      ^
>  \v
abc 
>  abc
111
>  x
3
>  a
6
>  :
7
  \v
abc 
$ rlwrap -n ./k
kona      \ for help. \\ to exit.

  abc:111
  \b s
  {a:x; a:5; \a:6; 7}3
stop
{a:x; a:5; \a:6; 7}3
>  \v
`abc `x
>  abc
111
>  x
>  a
value error
a
^
value error
>>  \
>  :
7
  \v
`abc `x

It's not clear which issue is better to address first.

tavmem commented 4 years ago

After the commit noted above:

kona      \ for help. \\ to exit.

  abc:111; def:222;
  \b s
  {a:x; a:67890; \a:6; 7}12345
stop
{a:x; a:67890; \a:6; 7}12345
>  abc
111
>  x
12345
>  a
6
>  def
222
>  :
7
  \v
`abc `def