Mirror of CollapseOS
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

17 Zeilen
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.