Mirror of CollapseOS
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

17 wiersze
646B

  1. (cont.) What if we could implement those parsing routines in
  2. Forth? "But it's a core routine!" you say. Yes, but here's the
  3. deal: at its native core, only decimal parsing is supported. It
  4. lives in the "(parsed)" word. The interpreter's main loop is
  5. initially set to simply call that word.
  6. However, in core.fs, "(parsex)", "(parsec)" and "(parseb)" are
  7. implemented, in Forth, then "(parse)", which goes through them
  8. all is defined. Then, "(parsef)", which is the variable in
  9. which the interpreter's word pointer is set, is updated to that
  10. new "(parse)" word.
  11. This way, we have a full-featured (and extensible) parsing with
  12. a tiny native core.