| Deutsch English Français Italiano |
|
<vcd1tp$3nsk0$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Stephen Pelc <stephen@vfxforth.com> Newsgroups: comp.lang.forth Subject: Re: single-xt approach in the standard Date: Tue, 17 Sep 2024 23:04:25 -0000 (UTC) Organization: A noiseless patient Spider Lines: 37 Message-ID: <vcd1tp$3nsk0$1@dont-email.me> References: <vcbn5e$3etuk$1@dont-email.me> <vccka8$3l9rv$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 18 Sep 2024 01:04:25 +0200 (CEST) Injection-Info: dont-email.me; posting-host="01f0aa16ff2599ddf438f7701c896dcb"; logging-data="3928704"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hQUwKugmT6DdrZdVLWpfl" User-Agent: Usenapp for MacOS Cancel-Lock: sha1:zkY8vBvo45WrgUZLWbKkHuA/n0M= X-Usenapp: v1.27.4/l - Full License Bytes: 2724 On 17 Sep 2024 at 21:12:08 CEST, "Anthony Howe" <achowe@snert.com> wrote: > On 2024-09-17 06:54, Ruvim wrote: >> Do you think that the Forth standard should recognize the classic single-xt >> approach as possible for implementing a standard Forth system? >> >> The classic single-xt approach implies that only one execution token (xt) is >> associated with a name token (nt), and only one name token is associated with a >> word (a named Forth definition). And words whose compilation semantics differ >> form default compilation semantics are implemented as immediate words. > > Given I prefer single-xt (currently), what I don't get is how for a dual-xt > system you define a single word with two actions for interpret and compile. I > don't see a word to distinguish between the two, except maybe IMMEDIATE. VFX Forth 64 is a single xt system (with sub-xts) . It manages to separate compilation and interpret actions for a word cleanly. S" is defined as below: : S" \ Comp: "ccc<quote>" -- ; Run: -- c-addr u 6.1.2165 \ *G Describe a string. Text is taken up to the next double-quote \ ** character. The address and length of the string are returned. [char] " parse >syspad ; ndcs: ( -- ) discard-sinline compile (s") ", ; NDCS: describes the non-default compilation sematics of the word. The process of arriving at this model is described in several recent EuroForth papers. -- Stephen Pelc, stephen@vfxforth.com MicroProcessor Engineering, Ltd. - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)78 0390 3612, +34 649 662 974 http://www.mpeforth.com MPE website http://www.vfxforth.com/downloads/VfxCommunity/ downloads