Re: single-xt approach in the standard

Liste des GroupesRevenir à cl forth 
Sujet : Re: single-xt approach in the standard
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forth
Date : 17. Sep 2024, 20:25:39
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Sep17.212539@mips.complang.tuwien.ac.at>
References : 1 2
User-Agent : xrn 10.11
Anthony Howe <achowe@snert.com> writes:
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.

If you want the interpretation and compilation semantics,
NAME>INTERPRET gives you the interpretation semantics of the word, and
NAME>COMPILE gives you the compilation semantics.

I
don't see a word to distinguish between the two, except maybe IMMEDIATE.

There is no standardized way to define words with arbitrary
combinations of interpretation and compilation semantics.  I don't
consider this to be a problem.  We would need such words only for
defining words like S", and we don't need additional words of this
kind.

If you want to see where going for full support for defining arbitrary
combinations leads, read our EuroForth 2019 paper [paysan&ertl19].

@InProceedings{paysan&ertl19,
  author =       {Bernd Paysan and M. Anton Ertl},
  title =        {The new {Gforth} Header},
  crossref =     {euroforth19},
  pages =        {5--20},
  url =          {http://www.euroforth.org/ef19/papers/paysan.pdf},
  url-slides =   {http://www.euroforth.org/ef19/papers/paysan-slides.pdf},
  video =        {https://wiki.forth-ev.de/doku.php/events:ef2019:header},
  OPTnote =      {refereed},
  abstract =     {The new Gforth header is designed to directly
                  implement the requirements of Forth-94 and
                  Forth-2012.  Every header is an object with a fixed
                  set of fields (code, parameter, count, name, link)
                  and methods (\texttt{execute}, \texttt{compile,},
                  \texttt{(to)}, \texttt{defer@}, \texttt{does},
                  \texttt{name>interpret}, \texttt{name>compile},
                  \texttt{name>string}, \texttt{name>link}).  The
                  implementation of each method can be changed
                  per-word (prototype-based object-oriented
                  programming).  We demonstrate how to use these
                  features to implement optimization of constants,
                  \texttt{fvalue}, \texttt{defer}, \texttt{immediate},
                  \texttt{to} and other dual-semantics words, and
                  \texttt{synonym}.}
}

@Proceedings{euroforth19,
  title = {35th EuroForth Conference},
  booktitle = {35th EuroForth Conference},
  year = {2019},
  key = {EuroForth'19},
  url =          {http://www.euroforth.org/ef19/papers/proceedings.pdf}
}

  : s" ( "ccc" -- sd | )
    [char] " parse
    state @ if postpone sliteral exit then
    dup >r allocate throw tuck r@ move r>
  ; immediate

This definition does not implement the standard word CORE S" or FILE
S" (maybe if he redefined NAME>INTERPRET and NAME>COMPILE, and
consequently POSTPONE, and ', but he doesn't do that).

- anton
--
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
   EuroForth 2024: https://euro.theforth.net

Date Sujet#  Auteur
17 Sep 24 * single-xt approach in the standard78Ruvim
17 Sep 24 +* Re: single-xt approach in the standard15minforth
17 Sep 24 i`* Re: single-xt approach in the standard14Ruvim
17 Sep 24 i `* Re: single-xt approach in the standard13Anthony Howe
18 Sep 24 i  +* Re: single-xt approach in the standard7dxf
18 Sep 24 i  i`* Standardization process (was: single-xt approach in the standard)6Ruvim
18 Sep 24 i  i `* Re: Standardization process5dxf
18 Sep 24 i  i  +* Re: Standardization process3Ruvim
18 Sep 24 i  i  i`* Re: Standardization process2dxf
18 Sep 24 i  i  i `- Re: Standardization process1Ruvim
18 Sep 24 i  i  `- Re: Standardization process1Ruvim
18 Sep 24 i  `* Re: single-xt approach in the standard5Ruvim
18 Sep 24 i   `* Re: single-xt approach in the standard4Gerry Jackson
19 Sep 24 i    +- Re: single-xt approach in the standard1albert
19 Sep 24 i    `* Standard testsuite (was: single-xt approach in the standard)2Ruvim
19 Sep 24 i     `- Re: Standard testsuite (was: single-xt approach in the standard)1albert
17 Sep 24 +* Re: single-xt approach in the standard46mhx
17 Sep 24 i+* Re: single-xt approach in the standard44Ruvim
17 Sep 24 ii+* Re: single-xt approach in the standard2minforth
17 Sep 24 iii`- Re: single-xt approach in the standard1Ruvim
21 Sep 24 ii+* Re: single-xt approach in the standard28dxf
21 Sep 24 iii`* Re: single-xt approach in the standard27Ruvim
22 Sep 24 iii `* Re: single-xt approach in the standard26dxf
22 Sep 24 iii  +* Re: single-xt approach in the standard6Anton Ertl
22 Sep 24 iii  i+- Re: single-xt approach in the standard1albert
23 Sep 24 iii  i`* Re: single-xt approach in the standard4dxf
23 Sep 24 iii  i `* Re: single-xt approach in the standard3Anthony Howe
24 Sep 24 iii  i  +- Re: single-xt approach in the standard1dxf
25 Sep 24 iii  i  `- Re: single-xt approach in the standard1dxf
22 Sep 24 iii  `* Re: single-xt approach in the standard19Ruvim
22 Sep 24 iii   +* Re: single-xt approach in the standard5Anton Ertl
22 Sep 24 iii   i`* Semantics as observable behavior (was: single-xt approach in the standard)4Ruvim
22 Sep 24 iii   i `* Re: Semantics as observable behavior (was: single-xt approach in the standard)3Anton Ertl
22 Sep 24 iii   i  `* Re: Semantics as observable behavior2Ruvim
23 Sep 24 iii   i   `- Re: Semantics as observable behavior1Ruvim
22 Sep 24 iii   +* Re: single-xt approach in the standard4albert
22 Sep 24 iii   i`* Re: single-xt approach in the standard3Ruvim
23 Sep 24 iii   i `* Re: single-xt approach in the standard2albert
23 Sep 24 iii   i  `- Re: single-xt approach in the standard1minforth
23 Sep 24 iii   `* Re: single-xt approach in the standard9dxf
23 Sep 24 iii    `* Standard compliance for systems (was: single-xt approach in the standard)8Ruvim
22 Nov 24 iii     `* Re: Standard compliance for systems7dxf
22 Nov 24 iii      `* Re: Standard compliance for systems6minforth
22 Nov 24 iii       +* Re: Standard compliance for systems3mhx
22 Nov 24 iii       i`* Re: Standard compliance for systems2minforth
22 Nov 24 iii       i `- Re: Standard compliance for systems1mhx
23 Nov 24 iii       `* Re: Standard compliance for systems2dxf
24 Nov 24 iii        `- Re: Standard compliance for systems1dxf
21 Sep 24 ii+* Re: single-xt approach in the standard4Stephen Pelc
21 Sep 24 iii`* Re: single-xt approach in the standard3Ruvim
22 Sep 24 iii `* Re: single-xt approach in the standard2Stephen Pelc
22 Sep 24 iii  `- Re: single-xt approach in the standard1Anton Ertl
22 Sep 24 ii`* Re: single-xt approach in the standard9albert
22 Sep 24 ii `* Re: single-xt approach in the standard8Ruvim
23 Sep 24 ii  `* Re: single-xt approach in the standard7albert
23 Sep 24 ii   +* Re: single-xt approach in the standard3mhx
23 Sep 24 ii   i`* Re: single-xt approach in the standard2Anton Ertl
23 Sep 24 ii   i `- Re: single-xt approach in the standard1mhx
23 Sep 24 ii   `* Re: single-xt approach in the standard3Ruvim
23 Sep 24 ii    `* Re: single-xt approach in the standard2Anton Ertl
25 Sep 24 ii     `- Re: single-xt approach in the standard1Ruvim
17 Sep 24 i`- Re: single-xt approach in the standard1albert
17 Sep 24 +* Re: single-xt approach in the standard11Anthony Howe
17 Sep 24 i+* Re: single-xt approach in the standard2Anton Ertl
24 Sep 24 ii`- Re: single-xt approach in the standard1Anthony Howe
18 Sep 24 i+* Re: single-xt approach in the standard4Stephen Pelc
18 Sep 24 ii`* Re: single-xt approach in the standard3Ruvim
18 Sep 24 ii `* Re: single-xt approach in the standard2mhx
19 Sep 24 ii  `- Re: single-xt approach in the standard1Ruvim
18 Sep 24 i`* Re: single-xt approach in the standard4Ruvim
18 Sep 24 i +- Re: single-xt approach in the standard1Ruvim
18 Sep 24 i `* Re: single-xt approach in the standard2Hans Bezemer
19 Sep 24 i  `- Re: single-xt approach in the standard1albert
17 Sep 24 +- Re: single-xt approach in the standard1Anton Ertl
18 Sep 24 +- Re: single-xt approach in the standard1Ruvim
21 Sep 24 `* Re: single-xt approach in the standard3PMF
22 Sep 24  +- Re: single-xt approach in the standard1Anton Ertl
22 Sep 24  `- Re: single-xt approach in the standard1Ruvim

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal