Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #9861
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: RfD: TRAVERSE-WORDLIST v4 |
| Date | 2012-03-05 14:18 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2012Mar5.151806@mips.complang.tuwien.ac.at> (permalink) |
| References | <3a561970-391e-4f30-8dc8-049d5942f159@gi10g2000vbb.googlegroups.com> <4f8a7e9c-6afd-4258-9bb4-0ec5da74305f@d17g2000vba.googlegroups.com> |
Alex McDonald <blog@rivadpm.com> writes:
>Focusing on the stack effects, can I get some feedback on this
>proposed change. I've tried to take account of the comments made so
>far.
>
>----
>
>...
>
>
>2. Proposal
>-----------
>
>TRAVERSE-WORDLIST ( wid xt -- x*j ) "traverse-wordlist" TOOLS-EXT
The stack effect should be ( i*x wid xt -- j*x ), no?
Concerning "i*x" vs. "x*i", Table 3.1 gives us "i*x".
>Remove wid and xt from the stack. Traverse the wordlist wid,
>executing xt, a user-specified word with the stack effect
>( nt -- x*i u )
Likewise, this should be ( k*x nt -- l*x u )
> without immediately returning to the caller,
>executing xt at most once for every node in the wordlist, and
>terminating once all the nodes have been exhausted or until xt
>returns the continue flag u with a zero (FALSE) value.
Use "word" instead of the (undefined) "node".
Actually, this does not guarantee that any word is actually visited.
Either remove the "at most", or just specify explicitly that every
word in the wordlist is visited once if xt always returns non-zero.
>An invocation of the xt with the stack diagram ( x*i nt -- x*j u )
>must subsequently invoke xt with the stack diagram ( x*j nt ).
>TRAVERSE-WORDLIST returns x*j from the last execution, if any, of the
>xt.
That's pretty complicated and not really clear. Maybe we should look
at how it is solved for EXECUTE and write something like:
|The parts of the stack effect represented by i*x and j*x are due to
|the k*x and l*x parts in the stack effect of xt (which may be
|executed several times).
- 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: http://www.forth200x.org/forth200x.html
EuroForth 2011: http://www.euroforth.org/ef11/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RfD: TRAVERSE-WORDLIST v4 Alex McDonald <blog@rivadpm.com> - 2012-02-28 05:14 -0800
Re: RfD: TRAVERSE-WORDLIST v4 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-02-28 17:18 +0000
Re: RfD: TRAVERSE-WORDLIST v4 Alex McDonald <blog@rivadpm.com> - 2012-02-28 13:54 -0800
Re: RfD: TRAVERSE-WORDLIST v4 "Elizabeth D. Rather" <erather@forth.com> - 2012-02-28 12:16 -1000
Re: RfD: TRAVERSE-WORDLIST v4 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-02-29 15:42 +0000
Re: RfD: TRAVERSE-WORDLIST v4 "Elizabeth D. Rather" <erather@forth.com> - 2012-02-29 06:49 -1000
Re: RfD: TRAVERSE-WORDLIST v4 "Peter Knaggs" <pjk@bcs.org.uk> - 2012-02-29 20:05 +0000
Re: RfD: TRAVERSE-WORDLIST v4 BruceMcF <agila61@netscape.net> - 2012-02-28 14:40 -0800
Re: RfD: TRAVERSE-WORDLIST v4 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-02-29 15:47 +0000
Re: RfD: TRAVERSE-WORDLIST v4 BruceMcF <agila61@netscape.net> - 2012-02-29 08:13 -0800
Re: RfD: TRAVERSE-WORDLIST v4 "Peter Knaggs" <pjk@bcs.org.uk> - 2012-02-29 20:07 +0000
Re: RfD: TRAVERSE-WORDLIST v4 Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-02-29 11:27 +0000
Re: RfD: TRAVERSE-WORDLIST v4 "Peter Knaggs" <pjk@bcs.org.uk> - 2012-02-29 20:20 +0000
Re: RfD: TRAVERSE-WORDLIST v4 BruceMcF <agila61@netscape.net> - 2012-02-29 16:44 -0800
Re: RfD: TRAVERSE-WORDLIST v4 "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-01 08:45 +0000
Re: RfD: TRAVERSE-WORDLIST v4 BruceMcF <agila61@netscape.net> - 2012-03-01 16:15 -0800
Re: RfD: TRAVERSE-WORDLIST v4 "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-02 09:58 +0000
Re: RfD: TRAVERSE-WORDLIST v4 BruceMcF <agila61@netscape.net> - 2012-03-02 22:37 -0800
Re: RfD: TRAVERSE-WORDLIST v4 Alex McDonald <blog@rivadpm.com> - 2012-03-04 14:03 -0800
Re: RfD: TRAVERSE-WORDLIST v4 "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-05 13:20 +0000
Re: RfD: TRAVERSE-WORDLIST v4 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-05 14:18 +0000
Re: RfD: TRAVERSE-WORDLIST v4 Alex McDonald <blog@rivadpm.com> - 2012-03-27 15:23 -0700
csiph-web