On Mar 12, 4:27 pm, John Passaniti <n...@[EMAIL PROTECTED]
> wrote:
> Bruce McFarling wrote:
> > Ah, so a GCC stack-machine compiler that sup****ts a compatible subset
> > of Forth-94, for which a full Forth-94 implementation, such as gforth,
> > could play the role of cross-compiler.
>
> Not exactly what I was thinking of, but sure. To me, a Forth front-end
> for GCC would be a full, interactive, extensible Forth. The only
> difference would be that instead of directly generating code as threaded
> lists or subroutine calls or native code, it would emit the code as the
> tree data structures that the optimizer and then back-end would then
> use. Also emitted would be a data structure corresponding to Forth's
> dictionary.
Yes, I believe that's Bernd's point ... that if you do that, and that
alone, its going to be difficult to get the fully interactive
incremental compilation working well ... I believe the degree of
difficulty he assigned it would be 10 out of 10, aka "impossible".
However, if the Forth was operating as an emulating cross compiler,
building an executable dictionary and the tree structure side by side,
that could be very much like programming a microcontroller through an
umbilical.
Then the "sub-Forth" that directly emits the tree structure to
generate from static source is "the GCC Front End", while the cross
compiling Forth is a "Rapid Application Design tool for" "the GCC
Front End".
Not the kind of project I would touch in the next decade or two, but
an interesting idea.


|