mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 20:58:05 +11:00
79ce88c12c
and remove cfspack, which will not ever be used again.
17 lines
646 B
Plaintext
17 lines
646 B
Plaintext
(cont.) What if we could implement those parsing routines in
|
|
Forth? "But it's a core routine!" you say. Yes, but here's the
|
|
deal: at its native core, only decimal parsing is supported. It
|
|
lives in the "(parsed)" word. The interpreter's main loop is
|
|
initially set to simply call that word.
|
|
|
|
However, in core.fs, "(parsex)", "(parsec)" and "(parseb)" are
|
|
implemented, in Forth, then "(parse)", which goes through them
|
|
all is defined. Then, "(parsef)", which is the variable in
|
|
which the interpreter's word pointer is set, is updated to that
|
|
new "(parse)" word.
|
|
|
|
This way, we have a full-featured (and extensible) parsing with
|
|
a tiny native core.
|
|
|
|
|