Sat Mar 12 15:47:24 EST 2011

The new `forth-begin'

Forth code is a straight line, and it generates Scheme expressions
that look like:

(variables a b c)
  (foo 123)
  (bar foo 1 +))
  (baz foo bar + <hole> ))

Essentially, a module s-expression is built one atom at a time.  The
default behaviour is to simply append at the end of the last
expression, i.e. in the above it would be at <hole>.

Problems: there is no "macros-flat" form.

Once there is, it should be quite straightforward to use this
approach.  The expression could be kept in inverted representation as
long as recursive expansion is not necessary, i.e. a scheme form that
introduces names needs to be properly inserted before the forth
parsing goes on.

The basic misunderstanding in the previous approach is that it is
possible to take a whole file and build a single huge s-expression,
which will then be expanded at once.  Because of introduction of names
this isn't possible without recursive expansion.  Let's build that in
from the start.

I forgot, the prefix parser thing is actually quite deep..  The call
to `syntax-local-value` is in rpn/parse.ss

So it doesn't look all that bad over there..  It's the middle part
that's rotten.