#lang scheme/base

 (for-syntax scheme/base)




 (ns-out (scat)
   (combine-out compile    ;; compile word refernce (struct target-word)
                literal))  ;; compile literal value (target-value)


 (op-combine-out   qw cw)

 ;; For matching
 qw? cw?)

;; Macro primitives are just scat words.
(define-syntax-rule (macro-prim: . code) (scat: . code))

;; The core virtual words used in the macro evaluator.
  (qw value)
  (cw addr))

(define (qw? x) (eq? x (asm: qw)))
(define (cw? x) (eq? x (asm: cw)))

;; These are words that most certainly need to be redefined at some
;; point when mapping to a target architecture. They are used in
;; to implement the core of macro/forth/variable.

 (scat) scat:
 (literal ',(asm: qw) >tag)
 (compile ',(asm: cw) >tag))

;; Used in : macro-immedate
(define (lit datum) (macro-prim: ',datum literal))