Using PARSE IN PORT! cost

I tried using PARSE on PORT! and it does not work:

>> parse open %test-data.r [to end]  
** Script error: parse does not allow port! for its input argument

Of course, it works if you read the data in:

>> parse read open %test-data.r [to end]  
== true

... but it seems to be useful to use PARSE for large files without first loading them into memory.

Is there a reason PARSE cannot work in PORT! ... or is it not yet implemented?

+3
source share
2 answers

the simple answer is no, we cannot ...

How parsing works, it may need to roll back to the previous part of the input line, which could actually be the head of the full input when it encounters the last character of the stream.

, , "" . ... , .

, , rebol... , .; -)

, , , .

, ,

APPEND buffer COPY/part connection amount

1 1 , , .

, , , .

- , / , , , .

, .

tcp EDI, " " tcp-, () , .

- /no -wait loop , ( , "").

, , (, ) , .

, , , , . - , , sysadmin .

HTH!

+6

, . . , , .

, , , , .

. , . , , , , | , .

, -, , , 1024 title, , ...

, , .

WISH CureCode: http://curecode.org/rebol3/

+3

Source: https://habr.com/ru/post/1773690/


All Articles