2018-10-01 16:56:49 +02:00
|
|
|
~~~
|
|
|
|
{{
|
|
|
|
:eol? (c-f)
|
|
|
|
[ ASCII:CR eq? ] [ ASCII:LF eq? ] [ ASCII:SPACE eq? ] tri or or ;
|
|
|
|
|
|
|
|
:valid? (s-sf)
|
|
|
|
dup s:length n:-zero? ;
|
|
|
|
|
|
|
|
:check-bs (c-c)
|
|
|
|
dup [ #8 eq? ] [ #127 eq? ] bi or [ buffer:get buffer:get drop-pair ] if ;
|
|
|
|
|
2018-11-22 03:16:41 +01:00
|
|
|
:c:get (-c) as{ 'liii.... i #1 d }as ;
|
2018-10-01 16:56:49 +02:00
|
|
|
|
|
|
|
:s:get (-s) [ #1025 buffer:set
|
|
|
|
[ c:get dup buffer:add check-bs eol? ] until
|
|
|
|
buffer:start s:chop ] buffer:preserve ;
|
|
|
|
|
|
|
|
:listen (-)
|
|
|
|
repeat s:get valid? &interpret &drop choose again ;
|
|
|
|
|
|
|
|
&listen #1 store
|
|
|
|
}}
|
|
|
|
~~~
|