Re: Split a string and characters
Bernd Paysan <[email protected]> Thu, 08 Dec 2022 23:42:27 +0100
| Newsgroups | gmane.comp.lang.forth.gforth |
|---|---|
| Message-ID | <1838180.tdWV9SEqCh@liubei> |
Am Montag, 5. Dezember 2022, 10:37:17 CET schrieb paul.ortais-WGBUbHxT2D9Wk0Htik3J/[email protected]: > Dear all, > > Sadly enough for Hendursaga's request, FORTH already does this with the > interpreter, and IMO should have done it, for decades, with an open, > clear generic state machine that reacts to incoming characters in case > it is treating an incoming file, so that any user has the ability to > patch and arrange it for its own purpose, in the FOTH spririt. > > For obscure reasons this was never done, and kept bundled in the sealed > set of words the interpreter/compiler uses, making the whole stuff the > grey box in a system claiming to be transparent. It makes it > unnecessarily complex to port FORTH to any new target. About the same > burden as missing the half-dozen words in a PC to plot a pixel in some > graphic pixel, the greatest lack in Forth. > > To remain compliant with say, ANS, traditional inner loop words would > then be coded as pointers to the generic file parsing, FSM mode... That is what the recognizer proposal is for. So yes, it was done, and it is available in the development version of Gforth. https://forth-standard.org/proposals/minimalistic-core-api-for-recognizers#reply-892 -- Bernd Paysan "If you want it done right, you have to do it yourself" net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ* https://net2o.de/
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERJ1NDqPQRwYnwBjr9y2Uk5MtoGcFAmOSaFMACgkQ9y2Uk5Mt oGe6Ow/+IteO6qmnRugN3RH5DdaJ7mdcteWWHBck+uOtqyzt9EpxEBunRc6HX2so qKfWWfpY73S+Gp+17UiJ0C5hzJfgLX5TmVWc8OKD9clBeDf8D9pJvIjOel2z6o6l YuQlGA8Co9RVUOtnjU+/dAkNa5OM3bp926Fje/CT4wCsbKqTK2hCa7cuXW2PoT69 BFDNRdwKOi++vRFFCYm/UdAz8IujhWIjVY7Q/2IBE3LJwZMYlQLlXIqxoHvLXCLA /uVhktDaOSOCOV3uOV1W5Wa9MWlB3fbSptTUkcPsiJ/5hIYCUnCB78p8e4sa5qEa 14cny2dGvoad+0YDFqkPiNWcw8e4a7Nv6KUMYUMvKXZNW0d4JbOk44ZqAIx3Vik/ U7W83IZjhXW2Lr2QHb3MT6ofqyHfmW2RXPmpI782EwwZLKL8y7lzrjMnKMrEzXSG D7RUsrBXRUDAYjo8GW6dEkcAtth9UMr+pOMjOnzLUceWAB4jkOLUI6fMjD/5vRzW PfqwMflO/YIdU++Z1ToS+q28ov/NpE43JHAVekfbl67IG6aqKdntgGOdkXznoZqa NY8H6vMeS8H/VJ5Y+7PxYhV+R6tUkMsKI+xXuYWL8yt6mjKv+cV0Yw0ToD+LJ43s 2+kv3TLjgTwYKqT5CYBmhoEbmXan23AdADky56n71e9Qju0XT74= =JpTt -----END PGP SIGNATURE-----