Wed Apr 29 22:27:06 CEST 2009

forth signature

The deal is now: I have a file full of macro definitions, all in terms
of instantiate^ with as most as possible of the compile-time code
factored out in a separate module.

This should then be part of the instantiate^ signature, right?
Alternatively it can be instantiated outside of signatures.

Probably best with (extends instantiate^)

Now, before writing a Forth-only form for instantiation, let's first
concentrate on an s-expression.

(forth-variables (name ...))
(forth-words     (name code ...))
(forth-macros    (name code ...))

;; Scheme forms for instantiation.  Maybe these can better be
;; avoided..  Its probably simpler to define in terms of the wrap-xxx
;; functions directly.

 (define-syntax-rule (forth-macros (name code ...) ...)
   (begin (define-macro wrap-macro name code ...) ...))
 (define-syntax-rule (forth-words (name code ...) ...)
   (begin (define-forth wrap-word name code ...) ...))
 (define-syntax-rule (forth-variables (name ...))
   (begin (define-forth wrap-variable name 1 allot) ...))