Sat Jul 5 18:02:40 CEST 2008
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:
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.
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
non-null-compilation-stack: ((23) qw (qw 123))
=== context ===
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.