split coma/macro

Merged the split-off staapl-coma project: swaps the order of the two
stacks, such that there is a 1-stack metalanguage that doesn't use
Forth style control words. The log entries are inlined below.
What this does it give a clear separation between the languages:
* COMA
An s-expression based COmpositional MAcro language of which the
values represent atomic target programs. Using pattern matching,
program rewrite rules are implemented that perform partial
evaluation and program parameterization.
* MACRO
On top of COMA, a Forth macro language with Forth control words,
labels, code fallthrough and local exit macros.
-----
_Entry: swap the 2 stacks
_Date: Wed Jul 2 23:38:47 CEST 2008
I'd like to move to a single stack model for a clean Macro language,
all the other stacks are for Forth style control words.
This is the prototypical "deep change" that's hard to make in a
dynamic language. Is there a way to make this easier? Maybe separating
out part of the macro language (mos) which will implement the core
compiler + pattern matcher.
It involves changing all primitives, since they no longer move stuff
from the Scat stack to the asm stack, but transform data in-place.
Got pretty far already: got basic coma macro language to run + simple
macro> command line.
OK. got a bit further. stuck at:
box> (require "pic18.ss")
...
box> (repl ": asdf 123 23")
;; (macro) asdf
STATE:#<compiler>
non-null-compilation-stack: ((23) qw (qw 123))
=== context ===
/home/tom/darcs/staapl-coma/macro/postprocess.ss:36:0: empty-ctrl->asm
/home/tom/darcs/staapl-coma/macro/postprocess.ss:44:0: assert-empty-ctrl
/home/tom/darcs/staapl-coma/macro/instantiate.ss:218:0: compile-forth
/home/tom/darcs/staapl-coma/macro/instantiate.ss:384:0: target-compile-1
/home/tom/darcs/staapl-coma/macro.ss:35:0: target-compile
/usr/local/plt-3.99.0.26/collects/scheme/sandbox.ss:459:4: loop
while (macro> 123 23) works fine..
time to go to bed..
_Entry: bug fixes
_Date: Sat Jul 5 17:54:14 CEST 2008
Nothing serious, just some missing dependencies due to file splits,
and the expected ctrl/asm confusion here and there.
What i did note: pic18/test.f doesn't 'require' but it does 'load'
Looks like we're done. Time to merge.