Article View: comp.lang.forth
Article #70Re: The curse of parsing words
From: Hans Bezemer
Date: Mon, 12 Oct 2026 16:36
Date: Mon, 12 Oct 2026 16:36
47 lines
3117 bytes
3117 bytes
On 12-10-2026 09:56, albert@spenarnc.xs4all.nl wrote:
> I was to modify the metacompiler of noforth to make it more
> portable, using i.a. ciforth.
> https://github.com/WillemOuwerkerk/noForth-T-for-the-RP2040
>
> Enters +TO. If you add VALUE to a Forth and you don't have
> +TO, how would you define it? ( Fortunately ciforth has it,
> besides the implementation of TO is in source and hints to
> the implementation of +TO ).
>
> Untested:
> : +TO >IN @ >R BL WORD COUNT EVALUATE + R> >IN ! ['] TO EVALUATE ;
>
> Compares this to a missing +! .
> Untested:
> : +! SWAP OVER @ + SWAP ! ;
>
> Groetjes Albert
Agreed, I don't like parsing words either in 4tH. All of these are hard
coded in my compiler (fifth column):
...
{ 2, 0, -2, "#!", EOL, DoComment },
{ 2, 0, -1, ",\"", "\"", DoCommaQuote },
{ 2, 0, -1, ",|", "|", DoCommaQuote },
{ 2, 0, -1, ".\"", "\"", DoDotQuote },
{ 2, 0, -1, ".(", ")", DoDotQuote },
{ 2, 0, -1, ".|", "|", DoDotQuote },
{ 2, 0, -2, "C,", "", DoCComma },
{ 2, 0, -2, "C\"", "\"", DoCQuote },
{ 2, 0, -2, "C|", "|", DoCQuote },
{ 2, 0, 1, ">=", "", DoGreaterEqual },
{ 2, 0, 1, "<=", "", DoLessEqual },
{ 2, 0, -1, "S\"", "\"", DoSQuote },
{ 2, 0, -1, "S|", "|", DoSQuote },
...
Before I had the preprocessor, there was no way to add any new ones
without adding a token and recompiling the whole shebang. TO, however,
is *NOT* one of my parsing words in the strictest sense. Still, without
the preprocessor I cannot handle them without changing the compiler.
I know that not all parsing words can be eradicated, but I wouldn't be
unhappy if there were less. ;-)
Hans Bezemer
Technical Details
Message-ID:
<11aj2b0$3pav1$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<nnd$1f5237c6$175c34ce@0d71f53c3bdb5abf>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Hans Bezemer <the.beez.speaks@gmail.com> Newsgroups: comp.lang.forth Subject: Re: The curse of parsing words Date: Mon, 12 Oct 2026 18:36:47 +0200 Organization: A noiseless patient Spider Lines: 47 Message-ID: <11aj2b0$3pav1$1@dont-email.me> References: <nnd$1f5237c6$175c34ce@0d71f53c3bdb5abf> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 12 Oct 2026 16:36:49 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3976161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uh1lv0w6eSdswPQyYFgiN"; posting-host="42a8e5110acdda7e98111e20d3f234cd" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:f1X8kapS1/7viUzIerWvgAn/8D8= sha256:rcJR8pZRgrVdpF5VNqbtLG5vTsHq8MacmIGYMCjyjlQ= sha1:yPmagdggLItoSCmb7odwKay0GMs= sha256:YqKipHb+//xwj7NxZhniCvas31wgycM6+UlkUQjFE68= Content-Language: en-US In-Reply-To: <nnd$1f5237c6$175c34ce@0d71f53c3bdb5abf>