,---------------. | Contributions | `---------------´ ,------------------------------------------ | 2024-07-25 16:53:47 TammoFreese wrote: | referenceImplementation - Reuse a test for SOURCE as a starting point for a reference implementation | see: https://forth-standard.org/standard/core/bs#contribution-351 `------------------------------------------ One of the tests of `SOURCE` (the word `GS4`) discards the remainder of the parse area using `SOURCE >IN ! DROP`. Making it immediate may be enough to make it a reference implementation for the backslash word: ``` : \ SOURCE >IN ! DROP ; IMMEDIATE ``` ,---------. | Replies | `---------´ ,------------------------------------------ | 2024-07-11 12:53:42 ruv replies: | comment - SAVE-INPUT | see: https://forth-standard.org/proposals/obsolescence-for-save-input-and-restore-input#reply-1266 `------------------------------------------ > ```forth > : EXECUTE-PARSING ROT ROT SAVE SET-SRC CATCH RESTORE THROW ; > ``` The standard does not allow `save-input` and `restore-input` to be used this way, because the identity of the input source on `restore-input` will not be the same as on `save-input` (but it shall be the same). > not having REFILL and line by line compilation is too revolutionary. Not quite. When the input source is a buffer, `refill` loads the next buffer (not the next line). When the input source is a multiline string, `refill` does almost nothing (see also my [proposal](https://forth-standard.org/proposals/support-for-single-line-comments-during-evaluate-) for "`\`"). So, not having "line by line compilation" is not something revolutionary.